Class: RGeo::CoordSys::CS::VerticalCoordinateSystem

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

Overview

OGC spec description

A one-dimensional coordinate system suitable for vertical measurements.

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 Info

#extension

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_, vertical_datum_, vertical_unit_, axis_, *optional_) ⇒ VerticalCoordinateSystem

:nodoc:



1108
1109
1110
1111
1112
1113
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1108

def initialize(name_, vertical_datum_, vertical_unit_, axis_, *optional_) # :nodoc:
  super(name_, 1, *optional_)
  @vertical_datum = vertical_datum_
  @vertical_unit = vertical_unit_
  @axis = axis_
end

Instance Attribute Details

#vertical_datumObject (readonly)

Gets the vertical datum, which indicates the measurement method.



1116
1117
1118
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1116

def vertical_datum
  @vertical_datum
end

#vertical_unitObject (readonly)

Gets the units used along the vertical axis. The vertical units must be the same as the CS_CoordinateSystem units.



1120
1121
1122
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1120

def vertical_unit
  @vertical_unit
end

Class Method Details

.create(name_, vertical_datum_, vertical_unit_, axis_, *optional_) ⇒ Object

Create a VerticalCoordinateSystem given a name, a VerticalDatum, a LinearUnit, and an AxisInfo. The AxisInfo is optional and may be nil. You may also provide the optional parameters specified by the Info interface.



1150
1151
1152
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1150

def create(name_, vertical_datum_, vertical_unit_, axis_, *optional_)
  new(name_, vertical_datum_, vertical_unit_, axis_, *optional_)
end

Instance Method Details

#_wkt_content(open_, close_) ⇒ Object

:nodoc:



1138
1139
1140
1141
1142
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1138

def _wkt_content(open_, close_) # :nodoc:
  arr_ = [@vertical_datum._to_wkt(open_, close_), @vertical_unit._to_wkt(open_, close_)]
  arr_ << @axis._to_wkt(open_, close_) if @axis
  arr_
end

#_wkt_typenameObject

:nodoc:



1134
1135
1136
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1134

def _wkt_typename # :nodoc:
  "VERT_CS"
end

#get_axis(_index_) ⇒ Object

Implements CoordinateSystem#get_axis



1130
1131
1132
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1130

def get_axis(_index_)
  @axis
end

#get_units(_index_) ⇒ Object

Implements CoordinateSystem#get_units



1124
1125
1126
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1124

def get_units(_index_)
  @vertical_unit
end