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:


1335
1336
1337
1338
1339
1340
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1335

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.


1344
1345
1346
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1344

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.


1348
1349
1350
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1348

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.


1384
1385
1386
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1384

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:


1369
1370
1371
1372
1373
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1369

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:


1365
1366
1367
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1365

def _wkt_typename  # :nodoc:
  "VERT_CS"
end

#get_axis(index_) ⇒ Object

Implements CoordinateSystem#get_axis


1360
1361
1362
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1360

def get_axis(index_)
  @axis
end

#get_units(index_) ⇒ Object

Implements CoordinateSystem#get_units


1353
1354
1355
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1353

def get_units(index_)
  @vertical_unit
end