Is there a way to convert coordinates from New Zealand Transverse Mercator to Google compatible longitude and latitude using PHP? I have tried PHP-COORD library, but it does not have the NZTM option.
Asked
Active
Viewed 338 times
0
-
NZTM2000 is EPSG:2193, Google Mercator is EPSG:3857. I know nothing about PHP but these codes might help. – Michael Stimson Mar 26 '19 at 03:56
-
It might be possible to use existing scripts for Transverse Mercator, such as this one and modify your $LongOrigin (173°) and $falseEasting (1600000) to fit New Zealand Transverse Mercator. – FSimardGIS Mar 26 '19 at 12:31
-
@FSimardGIS I tried convertTMtoLL() and convertLLtoLCC() they throws division by zero error – Darty Mar 28 '19 at 22:54
-
Which line is problematic? By the way, LL to LCC is Lat/Lon to Lambert Conformal Conic, so you probably won't need that one. – FSimardGIS Apr 01 '19 at 11:26
-
@FSimardGIS I found another solution here. Your comments were definitely helpful in setting me in the right direction – Darty Apr 02 '19 at 21:04