Class: RGeo::CoordSys::CS::ProjectedCoordinateSystem
- Inherits:
-
HorizontalCoordinateSystem
- Object
- Base
- Info
- CoordinateSystem
- HorizontalCoordinateSystem
- RGeo::CoordSys::CS::ProjectedCoordinateSystem
- Defined in:
- lib/rgeo/coord_sys/cs/entities.rb
Overview
OGC spec description
A 2D cartographic coordinate system.
Instance Attribute Summary collapse
-
#geographic_coordinate_system ⇒ Object
readonly
Returns the GeographicCoordinateSystem.
-
#linear_unit ⇒ Object
readonly
Returns the LinearUnits.
-
#projection ⇒ Object
readonly
Gets the projection.
Attributes inherited from HorizontalCoordinateSystem
Attributes inherited from CoordinateSystem
Attributes inherited from Info
#abbreviation, #alias, #authority, #authority_code, #name, #remarks
Class Method Summary collapse
-
.create(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) ⇒ Object
Create a ProjectedCoordinateSystem given a name, a GeographicCoordinateSystem, and Projection, a LinearUnit, and two AxisInfo objects.
Instance Method Summary collapse
-
#get_axis(index) ⇒ Object
Implements CoordinateSystem#get_axis.
-
#get_units(index) ⇒ Object
Implements CoordinateSystem#get_units.
-
#initialize(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) ⇒ ProjectedCoordinateSystem
constructor
:nodoc:.
- #wkt_typename ⇒ Object
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, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) ⇒ ProjectedCoordinateSystem
:nodoc:
1297 1298 1299 1300 1301 1302 1303 1304 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1297 def initialize(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) # :nodoc: super(name, geographic_coordinate_system.horizontal_datum, *optional) @geographic_coordinate_system = geographic_coordinate_system @projection = projection @linear_unit = linear_unit @axis0 = axis0 @axis1 = axis1 end |
Instance Attribute Details
#geographic_coordinate_system ⇒ Object (readonly)
Returns the GeographicCoordinateSystem.
1307 1308 1309 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1307 def geographic_coordinate_system @geographic_coordinate_system end |
#linear_unit ⇒ Object (readonly)
Returns the LinearUnits. The linear unit must be the same as the CS_CoordinateSystem units.
1314 1315 1316 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1314 def linear_unit @linear_unit end |
#projection ⇒ Object (readonly)
Gets the projection.
1310 1311 1312 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1310 def projection @projection end |
Class Method Details
.create(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) ⇒ Object
Create a ProjectedCoordinateSystem given a name, a GeographicCoordinateSystem, and Projection, a LinearUnit, and two AxisInfo objects. The AxisInfo objects are optional and may be set to nil. You may also provide the optional parameters specified by the Info interface.
1339 1340 1341 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1339 def create(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) new(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) end |
Instance Method Details
#get_axis(index) ⇒ Object
Implements CoordinateSystem#get_axis
1324 1325 1326 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1324 def get_axis(index) index == 1 ? @axis1 : @axis0 end |
#get_units(index) ⇒ Object
Implements CoordinateSystem#get_units
1318 1319 1320 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1318 def get_units(index) @linear_unit end |
#wkt_typename ⇒ Object
1328 1329 1330 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1328 def wkt_typename "PROJCS" end |