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 Base

#_to_wkt, #eql?, #inspect, #to_s, #to_wkt

Constructor Details

#initialize(name_, vertical_datum_, vertical_unit_, axis_, *optional_) ⇒ VerticalCoordinateSystem

:nodoc:



1268
1269
1270
1271
1272
1273
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1268

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.



1277
1278
1279
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1277

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.



1281
1282
1283
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1281

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.



1317
1318
1319
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1317

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:



1302
1303
1304
1305
1306
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1302

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:



1298
1299
1300
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1298

def _wkt_typename  # :nodoc:
  "VERT_CS"
end

#get_axis(index_) ⇒ Object

Implements CoordinateSystem#get_axis



1293
1294
1295
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1293

def get_axis(index_)
  @axis
end

#get_units(index_) ⇒ Object

Implements CoordinateSystem#get_units



1286
1287
1288
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1286

def get_units(index_)
  @vertical_unit
end