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

#eql?, #inspect, #to_s, #to_wkt

Constructor Details

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

:nodoc:



351
352
353
354
355
356
357
358
359
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 351

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.



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

def dx
  @dx
end

#dyObject (readonly)

Bursa Wolf shift in meters.



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

def dy
  @dy
end

#dzObject (readonly)

Bursa Wolf shift in meters.



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

def dz
  @dz
end

#exObject (readonly)

Bursa Wolf rotation in arc seconds.



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

def ex
  @ex
end

#eyObject (readonly)

Bursa Wolf rotation in arc seconds.



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

def ey
  @ey
end

#ezObject (readonly)

Bursa Wolf rotation in arc seconds.



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

def ez
  @ez
end

#ppmObject (readonly)

Bursa Wolf scaling in in parts per million.



381
382
383
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 381

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.



397
398
399
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 397

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:



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

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