Class: RGeo::CoordSys::CS::GeocentricCoordinateSystem
- Inherits:
-
CoordinateSystem
- Object
- Base
- Info
- CoordinateSystem
- RGeo::CoordSys::CS::GeocentricCoordinateSystem
- Defined in:
- lib/rgeo/coord_sys/cs/entities.rb
Overview
OGC spec description
A 3D coordinate system, with its origin at the centre of the Earth. The X axis points towards the prime meridian. The Y axis points East or West. The Z axis points North or South. By default the Z axis will point North, and the Y axis will point East (e.g. a right handed system), but you should check the axes for non-default values.
Instance Attribute Summary collapse
-
#horizontal_datum ⇒ Object
readonly
Returns the HorizontalDatum.
-
#linear_unit ⇒ Object
readonly
Gets the units used along all the axes.
-
#prime_meridian ⇒ Object
readonly
Returns the PrimeMeridian.
Attributes inherited from CoordinateSystem
Attributes inherited from Info
#abbreviation, #alias, #authority, #authority_code, #name, #remarks
Class Method Summary collapse
-
.create(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) ⇒ Object
Create a GeocentricCoordinateSystem given a name, a HorizontalDatum, a PrimeMeridian, a LinearUnit, and three AxisInfo objects.
Instance Method Summary collapse
- #geographic? ⇒ Boolean
-
#get_axis(index) ⇒ Object
Implements CoordinateSystem#get_axis.
-
#get_units(_index) ⇒ Object
Implements CoordinateSystem#get_units.
-
#initialize(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) ⇒ GeocentricCoordinateSystem
constructor
:nodoc:.
- #wkt_typename ⇒ Object
Methods inherited from CoordinateSystem
create_from_wkt, #projected?, #transform_coords
Methods inherited from Info
Methods inherited from Base
#encode_with, #eql?, #hash, #init_with, #inspect, #marshal_dump, #marshal_load, #to_s, #to_wkt
Constructor Details
#initialize(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) ⇒ GeocentricCoordinateSystem
:nodoc:
1110 1111 1112 1113 1114 1115 1116 1117 1118 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1110 def initialize(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) # :nodoc: super(name, 3, *optional) @horizontal_datum = horizontal_datum @prime_meridian = prime_meridian @linear_unit = linear_unit @axis0 = axis0 @axis1 = axis1 @axis2 = axis2 end |
Instance Attribute Details
#horizontal_datum ⇒ Object (readonly)
Returns the HorizontalDatum. The horizontal datum is used to determine where the centre of the Earth is considered to be. All coordinate points will be measured from the centre of the Earth, and not the surface.
1124 1125 1126 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1124 def horizontal_datum @horizontal_datum end |
#linear_unit ⇒ Object (readonly)
Gets the units used along all the axes.
1130 1131 1132 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1130 def linear_unit @linear_unit end |
#prime_meridian ⇒ Object (readonly)
Returns the PrimeMeridian.
1127 1128 1129 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1127 def prime_meridian @prime_meridian end |
Class Method Details
.create(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) ⇒ Object
Create a GeocentricCoordinateSystem given a name, a HorizontalDatum, a PrimeMeridian, a LinearUnit, and three AxisInfo objects. The AxisInfo are optional and may be nil. You may also provide the optional parameters specified by the Info interface.
1159 1160 1161 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1159 def create(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) new(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) end |
Instance Method Details
#geographic? ⇒ Boolean
1144 1145 1146 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1144 def geographic? true end |
#get_axis(index) ⇒ Object
Implements CoordinateSystem#get_axis
1140 1141 1142 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1140 def get_axis(index) [@axis0, @axis1, @axis2][index] end |
#get_units(_index) ⇒ Object
Implements CoordinateSystem#get_units
1134 1135 1136 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1134 def get_units(_index) @linear_unit end |
#wkt_typename ⇒ Object
1148 1149 1150 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1148 def wkt_typename "GEOCCS" end |