Converting Lat long to Universal Transverse Mercator

Hi Everyone,

Has any one created an expression to convert lat/Long to UTM for fixed zones? I have an excel sheet with the formulas and was thinking of imputing them into virtual columns with the final formula being expressed in an easting and northing column. If I could get some thoughts or suggestions that would be great!

0 6 1,179
6 REPLIES 6

Would love to be proved wrong but I donโ€™t think it can be done using app formulas.
This may be helpful

is this because expressions for SIN, CoSIN, etc. are not supported?

Yes.

Alan_Thorp
Participant IV

Iโ€™ve written a conversion from Lat,Long (WGS84) to NZTM (New Zealand Transverse Mercator 2000), if anyone needs it.

Hereโ€™s the Github link:
LL2NZTM

One caveate is that the formula doesnโ€™t take into account movement of the land over time, which NZTM is meant to. The official website where I got the formulae from doesnโ€™t have this aspect on it. Iโ€™ll update if I ever hear back from them about it. The error shouldnโ€™t be more than a metre though, which is inside the error of standard GPS anyway.

Alan_Thorp
Participant IV

UPDATE: Contact from LINZ about the formula that I used says that it is for converting from NZGD2000 rather than WGS84. Will work on a more complicated addition for the time dependant correction from WGS84.

Alan_Thorp
Participant IV

I came across a really easy API for coordinate conversion. It simply returns results as a JSON from a simple http request. e.g.
http://epsg.io/trans?x=174&y=-41&z=0&s_srs=4326&t_srs=2193
This example will return coordinates in New Zealand format NZTM2000. All the variables are contained in the request. You can pick your own coordinate system from the website:

Iโ€™ve put together some Apps Script code to run this as a web app where an AppSheet webhook can send the location fro conversion to the web app, the data is converted and returned by the epsg.io API and then sendt back to AppSheet via their API to update the table row that it came from. You can find the code for this here:

There are some instructions in the code. Let me know if you need any more pointers though.

I imagine that it would be possible to attach this code to a spreadsheet and update rows directly, therefore bypassing the need for the AppSheet API and the higher pricing tier required for it.

Top Labels in this Space