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

Constructor Details

#initialize(dx, dy, dz, ex, ey, ez, ppm) ⇒ WGS84ConversionInfo

:nodoc:


336
337
338
339
340
341
342
343
344
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 336

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.


347
348
349
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 347

def dx
  @dx
end

#dyObject (readonly)

Bursa Wolf shift in meters.


350
351
352
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 350

def dy
  @dy
end

#dzObject (readonly)

Bursa Wolf shift in meters.


353
354
355
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 353

def dz
  @dz
end

#exObject (readonly)

Bursa Wolf rotation in arc seconds.


356
357
358
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 356

def ex
  @ex
end

#eyObject (readonly)

Bursa Wolf rotation in arc seconds.


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

def ey
  @ey
end

#ezObject (readonly)

Bursa Wolf rotation in arc seconds.


362
363
364
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 362

def ez
  @ez
end

#ppmObject (readonly)

Bursa Wolf scaling in in parts per million.


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

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.


378
379
380
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 378

def create(dx, dy, dz, ex, ey, ez, ppm)
  new(dx, dy, dz, ex, ey, ez, ppm)
end

Instance Method Details

#to_wkt(standard_brackets = false) ⇒ Object


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

def to_wkt(standard_brackets = false)
  open, close = brackets(standard_brackets)
  "TOWGS84#{open}#{@dx},#{@dy},#{@dz},#{@ex},#{@ey},#{@ez},#{@ppm}#{close}"
end