How to convert UTM coordinate system.

I want to make a 3D map.

The current position is Utm coordinate system. How to convert it to x, y in JME3.

That is a big question that doesn’t really have anything to do with JME.

The short answer is that UTM is already in x,y and you could just use it… but it depends on whether your data set is large enough to span zones or not. But UTM should already be less distorted than lat/lon would be at resonable scales.

In the end, how hard this question is depends on what you are trying to do but you will likely get more help in GIS related places since this is a GIS-style data conversion problem and not at all specific to any particular game engine.

Keep your data in one zone and use the northing+easting directly and that should get you pretty far.

Be careful if your northing and eastings are large because you will suffer the effects of floating point precision. For example, the city of Lansing in Michigan State Plane South has an easting of ~13,000,000 ft—at this level you can’t store any decimals in a standard float because there isn’t enough precision. This will result in lots of artifacts…

You can do it in double precision. (It’s weird to refer to “easting” in feet but it’s immaterial to the precision discussion.) But yes, regular float will not work for world coordinates in most coordinate systems.

Whatever the case, when you deal with real map coordinates then you need to localize them to “around the camera”. But, yeah, when you read the data you will definitely have to read it in double precision.

Yes but you can’t express an object’s transform with doubles in JME, only floats right?

Not exactly. For UTM, yes it is expressed in meters. But US state plane coordinates are expressed in either international feet or US survey feet, depending on the state. I just used this as an example because I work with SPCs.

…and then you can using 32 bit floating point for everything again.

1 Like