Class: Proj::DatumEnsemble

Inherits:
PjObject show all
Defined in:
lib/proj/datum_ensemble.rb

Instance Method Summary collapse

Methods inherited from PjObject

#angular_input?, #angular_output?, #area_of_use, #auth, #auth_name, #context, #context=, create, create_from_database, create_from_name, create_from_wkt, #definition, #degree_input?, #degree_output?, #deprecated?, #description, #equivalent_to?, #errno, #errorno, #factors, #geod_distance, #has_inverse?, #id, #id_code, #info, #initialize, #initialize_copy, #lp_distance, #lpz_distance, #name, #non_deprecated, #proj_type, #remarks, #scope, #source_crs, #target_crs, #to_json, #to_proj_string, #to_ptr, #to_s, #to_wkt, #xy_distance, #xyz_distance

Constructor Details

This class inherits a constructor from Proj::PjObject

Instance Method Details

#[](index) ⇒ Integer

Returns a member from a datum ensemble.

Parameters:

  • index (Integer)

    Index of the datum member to extract. Should be between 0 and DatumEnsembel#count - 1.

Returns:

  • (Integer)

See Also:



20
21
22
23
# File 'lib/proj/datum_ensemble.rb', line 20

def [](index)
  ptr = Api.proj_datum_ensemble_get_member(self.context, self, index)
  self.class.create_object(ptr, self.context)
end

#accuracyFloat

Returns the positional accuracy of the datum ensemble

Returns:

  • (Float)

    The data ensemble accuracy or -1 in case of error

See Also:



30
31
32
# File 'lib/proj/datum_ensemble.rb', line 30

def accuracy
  Api.proj_datum_ensemble_get_accuracy(self.context, self)
end

#countInteger

Returns the number of members of a datum ensemble



9
10
11
# File 'lib/proj/datum_ensemble.rb', line 9

def count
  Api.proj_datum_ensemble_get_member_count(self.context, self)
end