Class: RGeo::CoordSys::CS::WGS84ConversionInfo

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

Overview

OGC spec description

Parameters for a geographic transformation into WGS84. The Bursa Wolf parameters should be applied to geocentric coordinates, where the X axis points towards the Greenwich Prime Meridian, the Y axis points East, and the Z axis points North.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#encode_with, #eql?, #hash, #init_with, #inspect, #marshal_dump, #marshal_load, #to_s, #to_wkt

Constructor Details

#initialize(dx_, dy_, dz_, ex_, ey_, ez_, ppm_) ⇒ WGS84ConversionInfo

:nodoc:


405
406
407
408
409
410
411
412
413
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 405

def initialize(dx_, dy_, dz_, ex_, ey_, ez_, ppm_)  # :nodoc:
  @dx = dx_.to_f
  @dy = dy_.to_f
  @dz = dz_.to_f
  @ex = ex_.to_f
  @ey = ey_.to_f
  @ez = ez_.to_f
  @ppm = ppm_.to_f
end

Instance Attribute Details

#dxObject (readonly)

Bursa Wolf shift in meters.


417
418
419
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 417

def dx
  @dx
end

#dyObject (readonly)

Bursa Wolf shift in meters.


420
421
422
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 420

def dy
  @dy
end

#dzObject (readonly)

Bursa Wolf shift in meters.


423
424
425
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 423

def dz
  @dz
end

#exObject (readonly)

Bursa Wolf rotation in arc seconds.


426
427
428
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 426

def ex
  @ex
end

#eyObject (readonly)

Bursa Wolf rotation in arc seconds.


429
430
431
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 429

def ey
  @ey
end

#ezObject (readonly)

Bursa Wolf rotation in arc seconds.


432
433
434
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 432

def ez
  @ez
end

#ppmObject (readonly)

Bursa Wolf scaling in in parts per million.


435
436
437
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 435

def ppm
  @ppm
end

Class Method Details

.create(dx_, dy_, dz_, ex_, ey_, ez_, ppm_) ⇒ Object

Create the horizontal datum shift transformation into WGS84, given the seven Bursa Wolf parameters. The Bursa Wolf shift should be in meters, the rotation in arc seconds, and the scaling in parts per million.


451
452
453
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 451

def create(dx_, dy_, dz_, ex_, ey_, ez_, ppm_)
  new(dx_, dy_, dz_, ex_, ey_, ez_, ppm_)
end

Instance Method Details

#_to_wkt(open_, close_) ⇒ Object

:nodoc:


438
439
440
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 438

def _to_wkt(open_, close_)  # :nodoc:
  "TOWGS84#{open_}#{@dx},#{@dy},#{@dz},#{@ex},#{@ey},#{@ez},#{@ppm}#{close_}"
end