Class: RGeo::CoordSys::CS::ProjectedCoordinateSystem

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

Overview

OGC spec description

A 2D cartographic coordinate system.

Instance Attribute Summary collapse

Attributes inherited from HorizontalCoordinateSystem

#horizontal_datum

Attributes inherited from CoordinateSystem

#dimension

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

#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_systemObject (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_unitObject (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

#projectionObject (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_typenameObject


1328
1329
1330
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1328

def wkt_typename
  "PROJCS"
end