Class: RGeo::CoordSys::CS::LocalCoordinateSystem
- Inherits:
-
CoordinateSystem
- Object
- Base
- Info
- CoordinateSystem
- RGeo::CoordSys::CS::LocalCoordinateSystem
- 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
-
#local_datum ⇒ Object
readonly
Gets the local datum.
Attributes inherited from CoordinateSystem
Attributes inherited from Info
#abbreviation, #alias, #authority, #authority_code, #name, #remarks
Class Method Summary collapse
-
.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.
Instance Method Summary collapse
-
#_wkt_content(open_, close_) ⇒ Object
:nodoc:.
-
#_wkt_typename ⇒ Object
:nodoc:.
-
#get_axis(index_) ⇒ Object
Implements CoordinateSystem#get_axis.
-
#get_units(index_) ⇒ Object
Implements CoordinateSystem#get_units.
-
#initialize(name_, local_datum_, unit_, axes_, *optional_) ⇒ LocalCoordinateSystem
constructor
:nodoc:.
Methods inherited from Base
#_to_wkt, #eql?, #inspect, #to_s, #to_wkt
Constructor Details
#initialize(name_, local_datum_, unit_, axes_, *optional_) ⇒ LocalCoordinateSystem
:nodoc:
1126 1127 1128 1129 1130 1131 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1126 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_datum ⇒ Object (readonly)
Gets the local datum.
1135 1136 1137 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1135 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.
1169 1170 1171 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1169 def create(name_, local_datum_, unit_, axes_, *optional_) new(name_, local_datum_, unit_, axes_, *optional_) end |
Instance Method Details
#_wkt_content(open_, close_) ⇒ Object
:nodoc:
1156 1157 1158 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1156 def _wkt_content(open_, close_) # :nodoc: [@local_datum._to_wkt(open_, close_), @unit._to_wkt(open_, close_)] + @axes.map{ |ax_| ax_._to_wkt(open_, close_) } end |
#_wkt_typename ⇒ Object
:nodoc:
1152 1153 1154 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1152 def _wkt_typename # :nodoc: "LOCAL_CS" 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_) @axes[index_] end |
#get_units(index_) ⇒ Object
Implements CoordinateSystem#get_units
1147 1148 1149 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1147 def get_units(index_) @unit end |