Class: RGeo::CoordSys::CS::HorizontalDatum

Inherits:
Datum show all
Defined in:
lib/rgeo/coord_sys/cs/entities.rb

Overview

OGC spec description

Procedure used to measure positions on the surface of the Earth.

Instance Attribute Summary collapse

Attributes inherited from Datum

#datum_type

Attributes inherited from Info

#abbreviation, #alias, #authority, #authority_code, #name, #remarks

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Info

#extension

Methods inherited from Base

#_to_wkt, #encode_with, #eql?, #hash, #init_with, #inspect, #marshal_dump, #marshal_load, #to_s, #to_wkt

Constructor Details

#initialize(name_, datum_type_, ellipsoid_, wgs84_parameters_, *optional_) ⇒ HorizontalDatum

:nodoc:


935
936
937
938
939
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 935

def initialize(name_, datum_type_, ellipsoid_, wgs84_parameters_, *optional_)  # :nodoc:
  super(name_, datum_type_, *optional_)
  @ellipsoid = ellipsoid_
  @wgs84_parameters = wgs84_parameters_
end

Instance Attribute Details

#ellipsoidObject (readonly)

Returns the Ellipsoid.


943
944
945
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 943

def ellipsoid
  @ellipsoid
end

#wgs84_parametersObject (readonly)

Gets preferred parameters for a Bursa Wolf transformation into WGS84. The 7 returned values correspond to (dx,dy,dz) in meters, (ex,ey,ez) in arc-seconds, and scaling in parts-per-million.


948
949
950
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 948

def wgs84_parameters
  @wgs84_parameters
end

Class Method Details

.create(name_, datum_type_, ellipsoid_, wgs84_parameters_, *optional_) ⇒ Object

Create a HorizontalDatum given a name, datum type code, Ellipsoid, and WGS84ConversionInfo. The WGS84ConversionInfo is optional and may be set to nil. You may also provide the optional parameters specified by the Info interface.


970
971
972
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 970

def create(name_, datum_type_, ellipsoid_, wgs84_parameters_, *optional_)
  new(name_, datum_type_, ellipsoid_, wgs84_parameters_, *optional_)
end

Instance Method Details

#_wkt_content(open_, close_) ⇒ Object

:nodoc:


955
956
957
958
959
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 955

def _wkt_content(open_, close_)  # :nodoc:
  array_ = [@ellipsoid._to_wkt(open_, close_)]
  array_ << @wgs84_parameters._to_wkt(open_, close_) if @wgs84_parameters
  array_
end

#_wkt_typenameObject

:nodoc:


951
952
953
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 951

def _wkt_typename  # :nodoc:
  "DATUM"
end