Class: RGeo::CoordSys::CS::CompoundCoordinateSystem
- Inherits:
-
CoordinateSystem
- Object
- Base
- Info
- CoordinateSystem
- RGeo::CoordSys::CS::CompoundCoordinateSystem
- Defined in:
- lib/rgeo/coord_sys/cs/entities.rb
Overview
OGC spec description
An aggregate of two coordinate systems (CRS). One of these is usually a CRS based on a two dimensional coordinate system such as a geographic or a projected coordinate system with a horizontal datum. The other is a vertical CRS which is a one-dimensional coordinate system with a vertical datum.
Instance Attribute Summary collapse
-
#head ⇒ Object
readonly
Gets first sub-coordinate system.
-
#tail ⇒ Object
readonly
Gets second sub-coordinate system.
Attributes inherited from CoordinateSystem
Attributes inherited from Info
#abbreviation, #alias, #authority, #authority_code, #name, #remarks
Class Method Summary collapse
-
.create(name_, head_, tail_, *optional_) ⇒ Object
Create a CompoundCoordinateSystem given two sub-coordinate systems.
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_, head_, tail_, *optional_) ⇒ CompoundCoordinateSystem
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_, head_, tail_, *optional_) ⇒ CompoundCoordinateSystem
:nodoc:
926 927 928 929 930 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 926 def initialize(name_, head_, tail_, *optional_) # :nodoc: super(name_, head_.dimension + tail_.dimension, *optional_) @head = head_ @tail = tail_ end |
Instance Attribute Details
#head ⇒ Object (readonly)
Gets first sub-coordinate system.
933 934 935 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 933 def head @head end |
#tail ⇒ Object (readonly)
Gets second sub-coordinate system.
936 937 938 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 936 def tail @tail end |
Class Method Details
.create(name_, head_, tail_, *optional_) ⇒ Object
Create a CompoundCoordinateSystem given two sub-coordinate systems. You may also provide the optional parameters specified by the Info interface.
965 966 967 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 965 def create(name_, head_, tail_, *optional_) new(name_, head_, tail_, *optional_) end |
Instance Method Details
#_wkt_content(open_, close_) ⇒ Object
:nodoc:
956 957 958 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 956 def _wkt_content(open_, close_) # :nodoc: [@head._to_wkt(open_, close_), @tail._to_wkt(open_, close_)] end |
#_wkt_typename ⇒ Object
:nodoc:
952 953 954 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 952 def _wkt_typename # :nodoc: "COMPD_CS" end |
#get_axis(index_) ⇒ Object
Implements CoordinateSystem#get_axis
940 941 942 943 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 940 def get_axis(index_) hd_ = @head.dimension index_ < hd_ ? @head.get_axis(index_) : @tail.get_axis(index_ - hd_) end |
#get_units(index_) ⇒ Object
Implements CoordinateSystem#get_units
947 948 949 950 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 947 def get_units(index_) hd_ = @head.dimension index_ < hd_ ? @head.get_units(index_) : @tail.get_units(index_ - hd_) end |