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:



776
777
778
779
780
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 776

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.



783
784
785
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 783

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.



788
789
790
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 788

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.



806
807
808
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 806

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:



794
795
796
797
798
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 794

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:



790
791
792
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 790

def _wkt_typename # :nodoc:
  "DATUM"
end