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_meters, dy_meters, dz_meters, ex_arc_seconds, ey_arc_seconds, ez_arc_seconds, ppm) ⇒ WGS84ConversionInfo

:nodoc:



341
342
343
344
345
346
347
348
349
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 341

def initialize(dx_meters, dy_meters, dz_meters, ex_arc_seconds, ey_arc_seconds, ez_arc_seconds, ppm) # :nodoc:
  @dx = dx_meters.to_f
  @dy = dy_meters.to_f
  @dz = dz_meters.to_f
  @ex = ex_arc_seconds.to_f
  @ey = ey_arc_seconds.to_f
  @ez = ez_arc_seconds.to_f
  @ppm = ppm.to_f
end

Instance Attribute Details

#dxObject (readonly)

Bursa Wolf shift in meters.



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

def dx
  @dx
end

#dyObject (readonly)

Bursa Wolf shift in meters.



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

def dy
  @dy
end

#dzObject (readonly)

Bursa Wolf shift in meters.



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

def dz
  @dz
end

#exObject (readonly)

Bursa Wolf rotation in arc seconds.



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

def ex
  @ex
end

#eyObject (readonly)

Bursa Wolf rotation in arc seconds.



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

def ey
  @ey
end

#ezObject (readonly)

Bursa Wolf rotation in arc seconds.



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

def ez
  @ez
end

#ppmObject (readonly)

Bursa Wolf scaling in in parts per million.



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

def ppm
  @ppm
end

Class Method Details

.create(dx_meters, dy_meters, dz_meters, ex_arc_seconds, ey_arc_seconds, ez_arc_seconds, 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.



383
384
385
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 383

def create(dx_meters, dy_meters, dz_meters, ex_arc_seconds, ey_arc_seconds, ez_arc_seconds, ppm)
  new(dx_meters, dy_meters, dz_meters, ex_arc_seconds, ey_arc_seconds, ez_arc_seconds, ppm)
end

Instance Method Details

#to_wkt(standard_brackets: false) ⇒ Object



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

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