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 Info
Methods inherited from Base
#_to_wkt, #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:
991 992 993 994 995 996 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 991 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.
999 1000 1001 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 999 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.
1027 1028 1029 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1027 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:
1017 1018 1019 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1017 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:
1013 1014 1015 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1013 def _wkt_typename # :nodoc: "LOCAL_CS" end |
#get_axis(index_) ⇒ Object
Implements CoordinateSystem#get_axis
1003 1004 1005 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1003 def get_axis(index_) @axes[index_] end |
#get_units(_index_) ⇒ Object
Implements CoordinateSystem#get_units
1009 1010 1011 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1009 def get_units(_index_) @unit end |