Class: RGeo::CoordSys::CS::LocalCoordinateSystem

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

Overview

OGC spec description

A local coordinate system, with uncertain relationship to the world. In general, a local coordinate system cannot be related to other coordinate systems. However, if two objects supporting this interface have the same dimension, axes, units and datum then client code is permitted to assume that the two coordinate systems are identical. This allows several datasets from a common source (e.g. a CAD system) to be overlaid. In addition, some implementations of the Coordinate Transformation (CT) package may have a mechanism for correlating local datums. (E.g. from a database of transformations, which is created and maintained from real-world measurements.)

Notes

RGeo’s implementation does not provide the Coordinate Transformation (CT) package.

Instance Attribute Summary collapse

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?, #projected?, #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, local_datum, unit, axes, *optional) ⇒ LocalCoordinateSystem

:nodoc:



1050
1051
1052
1053
1054
1055
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1050

def initialize(name, local_datum, unit, axes, *optional) # :nodoc:
  super(name, axes.size, *optional)
  @local_datum = local_datum
  @unit = unit
  @axes = axes.dup
end

Instance Attribute Details

#local_datumObject (readonly)

Gets the local datum.



1058
1059
1060
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1058

def local_datum
  @local_datum
end

Class Method Details

.create(name, local_datum, unit, axes, *optional) ⇒ Object

Create a LocalCoordinateSystem given a name, a LocalDatum, a Unit, and an array of at least one AxisInfo. You may also provide the optional parameters specified by the Info interface.



1082
1083
1084
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1082

def create(name, local_datum, unit, axes, *optional)
  new(name, local_datum, unit, axes, *optional)
end

Instance Method Details

#get_axis(index) ⇒ Object

Implements CoordinateSystem#get_axis



1062
1063
1064
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1062

def get_axis(index)
  @axes[index]
end

#get_units(_index) ⇒ Object

Implements CoordinateSystem#get_units



1068
1069
1070
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1068

def get_units(_index)
  @unit
end

#wkt_typenameObject



1072
1073
1074
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1072

def wkt_typename
  "LOCAL_CS"
end