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 CoordinateSystem

create_from_wkt, #geographic?, #transform_coords

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:



1341
1342
1343
1344
1345
1346
1347
1348
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1341

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.



1351
1352
1353
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1351

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.



1358
1359
1360
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1358

def linear_unit
  @linear_unit
end

#projectionObject (readonly)

Gets the projection.



1354
1355
1356
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1354

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.



1387
1388
1389
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1387

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



1368
1369
1370
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1368

def get_axis(index)
  index == 1 ? @axis1 : @axis0
end

#get_units(_index) ⇒ Object

Implements CoordinateSystem#get_units



1362
1363
1364
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1362

def get_units(_index)
  @linear_unit
end

#projected?Boolean

Returns:

  • (Boolean)


1372
1373
1374
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1372

def projected?
  true
end

#wkt_typenameObject



1376
1377
1378
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1376

def wkt_typename
  "PROJCS"
end