LAT - LONG to UTM and viceversa in Grasshopper?

Hi!

Maybe this is a very basic question, but I’ve spent already many hours and can’t find a solution.

My challenge is to simply get the UTM position of a point that I know the LAT and LONG. Actually I have already defined in my Rhino file that 0,0,0 would correspond to that EARTHPOINTCOORDINATE.

But at some time in the future somebody will ask that in UTM. I can use a simple online calculator, but I guess it is possible in Grasshopper, but I have not find it.

Any suggestions?

Thank you again.

word of caution: the code is not tested for the general case, it just replicates your input and shows how to use python packages.

Here are the relevant docs: pyproj Transformer

1 Like

Hi @mutarq,
Heron has a Coordinate Transformation component that will convert a point from one coordinate system to another. You could construct a point from those lat/lon values and use the component to get UTM coordinates.

I can post an example when I get back to my machine next week.

-Brian

Hi Bryan!..

Thank you for replying! and of course next week would be ok… hope ther is an easier solution. But I’l try too the python Transfomer suggested by @dn.aur

Best!

Hi @mutarq ,
This is the set up for using Coordinate Transformation. You had two slightly different sets of coordinates in your original post, so I’m showing both.

-Brian

thank you very much for the suggestion…it works great. (i was confused with the EPSG codes. but now I get it too.)