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.

  • 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 3: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 1 '19 at 11:26
  • @FSimardGIS I found another solution here. Your comments were definitely helpful in setting me in the right direction – Darty Apr 2 '19 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.