Class: RGeo::CoordSys::CS::ProjectionParameter

Inherits:
Base
  • Object
show all
Defined in:
lib/rgeo/coord_sys/cs/entities.rb

Overview

OGC spec description

A named projection parameter value. The linear units of parameters' values match the linear units of the containing projected coordinate system. The angular units of parameter values match the angular units of the geographic coordinate system that the projected coordinate system is based on.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_, value_) ⇒ ProjectionParameter

:nodoc:


359
360
361
362
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 359

def initialize(name_, value_)  # :nodoc:
  @name = name_
  @value = value_.to_f
end

Instance Attribute Details

#nameObject (readonly)

The parameter name.


366
367
368
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 366

def name
  @name
end

#valueObject (readonly)

The parameter value.


369
370
371
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 369

def value
  @value
end

Class Method Details

.create(name_, value_) ⇒ Object

Create a parameter given the name and value.


386
387
388
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 386

def create(name_, value_)
  new(name_, value_)
end

Instance Method Details

#_wkt_content(open_, close_) ⇒ Object

:nodoc:


376
377
378
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 376

def _wkt_content(open_, close_)  # :nodoc:
  [@value]
end

#_wkt_typenameObject

:nodoc:


372
373
374
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 372

def _wkt_typename  # :nodoc:
  "PARAMETER"
end