0

I need to find a way to convert a pair of WGS84 geographic coordinates to ETRS89 projected coordinates (UTM) using php.

Example:

(lat)37.255205, (long)-5.549390, (height)141.562284

Anybody know how can I to do that?

Thank you!!

cweiske
  • 30,033
  • 14
  • 133
  • 194
Acicate
  • 63
  • 2
  • 10

2 Answers2

1

You can do it using a 7 parameter Helmert Transformation (I'm not sure of the accuracy though). But it depends on what you mean by WGS84. I believe ITRF2008 is current GPS reference frame. GPS position varies with time due to continental drift, where as ETRS89 is a fixed european plate reference, hence your parameters are time dependent.

Table 5 of the attached link gives you the 7 parameters. ETRF2000 is the reference frame normally used for ETRS89. Eg. in 2013 T1 (or dx) will be 52.1 + (13years x 0.1) = 53.4mm or 0.0534m. See Tabel 5 of this link http://etrs89.ensg.ign.fr/memo-V8.pdf

You will need to look up a Helmert Transformation formula, then input your 3 translations, scale factor and 3 rotations.

HTH Steve

(Edit: Oops. That will give you ETRS89 in Long/Lat/Height, you would still need to project it to UTM)

user19320
  • 11
  • 1
-1

I had success using https://github.com/dvdoug/PHPCoord

The test files have some examples: https://github.com/dvdoug/PHPCoord/blob/master/tests/LatLngTest.php#L122

cweiske
  • 30,033
  • 14
  • 133
  • 194