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

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.)

Could you elaborate on sourceSRS and destSRS inputs please?

What are the X and Y values going into the Point component?

Hello Brian ! im having some trouble with while reading some coordinates ….i have set the earth anchor point on rhino and then when puting a point on the 0,0,0 it should match, but it doesnt do you have any recomendations?

Hi @Mauricio_Bermudez ,

When I use the WorldXY as input to XYtoDD component, the output matches the input to SetEAP. Neither point 105 or 106 XYtoDD outputs match the SetEAP input in your definition. Can you confirm one of those points is actually 0,0,0?

-Brian

The only thing i know is the UTM of one corner of the project (2,245,309.353 and 454359.0271

)

Im starting with this UTM (454359.0271 and 2245309.3534)….so when i transform them to lon lat it tells me that they are (20.30514 and -87.437162)

this is the correct position but when i try to use this LON AND LAT for the earth anchor point and then to check the UTM to confirm…the UTM is different . i need some help !

Is there a way to use the UTM as earth anchor point?

I would set the EAP the following way:

SetEAP and DDtoXY currently expect WGS84 coordinates. But I’ll look into allowing them to use coordinates from the system set with the SRS component.

-Brian