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:



296
297
298
299
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 296

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

Instance Attribute Details

#nameObject (readonly)

The parameter name.



302
303
304
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 302

def name
  @name
end

#valueObject (readonly)

The parameter value.



305
306
307
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 305

def value
  @value
end

Class Method Details

.create(name_, value_) ⇒ Object

Create a parameter given the name and value.



318
319
320
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 318

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

Instance Method Details

#_wkt_content(_open_, _close_) ⇒ Object

:nodoc:



311
312
313
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 311

def _wkt_content(_open_, _close_) # :nodoc:
  [@value]
end

#_wkt_typenameObject

:nodoc:



307
308
309
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 307

def _wkt_typename # :nodoc:
  "PARAMETER"
end