Question

I'm working on rasterisation of the GSHHS database basically converting shoreline polygons and river lines to raster.

http://www.soest.hawaii.edu/pwessel/gshhg/

The rivers and shores databases are two different files.

I noticed misalignment of hundreds of meters between rivers and shores at points where they are clearly should be aligned. One thing I noticed in the README is that the shorelines database uses WGS84 coordinates and river database was generated form other source using WGS 72. The difference should be in shift of prime meridian and difference in primary axis dimensions of the Earth.

I've searched over the internet about conversion between the two sets and couldn't found.

Answers I need:

  • How can I convert between them?

Or alternatively

  • How do I solve misalignment in GSHHS database?
Was it helpful?

Solution

Here are the formulas and parameters to transform WGS 72 coordinates to WGS 84 coordinates

FORMULAS

  • Δφ" = (4.5 cos φ) / (a sin 1") + (Δf sin 2φ) / (sin 1") (Unit = Arc Seconds)
  • Δλ" = 0.554 (Unit = Arc Seconds)
  • Δh = 4.5 sin φ + a Δf sin2 φ - Δa + Δr (Unit = Meters)

  • Δφ = Δφ" x 1" (Unit = radians)
  • Δλ = Δλ" x 1" (Unit = radians)

PARAMETERS

  • Δf = 0.3121057 x 10-7
  • a = 6378135 m
  • Δa = 2.0 m
  • Δr = 1.4 m
  • 1" = pi / (3600.0 * 180.0) rad

To obtain WGS 84 coordinates, add the Δφ, Δλ, Δh changes calculated using WGS 72 coordinates to the WGS 72 coordinates (φ, λ, h, respectively). Latitude is positive north and longitude is positive east (0° to 180°).

RESULT

  • φ WGS84 = φ + Δφ
  • λ WGS84 = λ + Δλ
  • h WGS84 = h + Δh

Documentation [p105-106]

OTHER TIPS

You can use proj4:https://trac.osgeo.org/proj/wiki/man_proj. There are many ellipsoid identifiers supported. You can get a list with the -le option switch. To convert from wgs74 you can use the "towgs84" option switch.

One authoritative source is the National Geospatial Intelligence Agency (NGA). They publish open source, the Geotrans program at http://earth-info.nga.mil/GandG/geotrans/. This gives GUI, batch processing. I expect internally there is an API you could call as a developer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top