Question

I'm having trouble converting coordinates to UTM33 (Northern Hemisphere) in Java.

I have found plenty of lat/long to UTM converters, however these determine which UTM zone the coordinates are in and give an answer accondingly. That's not what I want, I basically want to force it to use UTM zone 33.

Example of how I want it:

Coordinates A and B are E 100m and N 100m in UTM 31, but I would like to know their position according to UTM 33, which may be E -1000m and N -1000m UTM 33.

I don't really care if I first get the UTM 31 coordinates and then convert them to UTM 33 or if I convert the lat/long coordinates directly to UTM 33, but I can't seem to find a library which does any of these.

Thanks for reading!

Was it helpful?

Solution

What I did was to use this converter and then changed the code a little. In the class LatLon2UTM's setVariables(double latitude, double longitude) method I changed the zone variable var1 to 33 and removed the calculation that calculated the real UTM zone.

original:

var1 = ((int) (longitude / 6)) + 31;

new:

var1 = 33;

Nothing great, but at least now I can convert to the zone I want!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top