Determining UTM or State Plane Zone

Nov 15, 2010 at 8:28 PM

Using DotSpatial, is it possible to convert from say, Lat/Long, to UTM, and have the zone automatically determined, rather than the user having to know which UTM zone the coordinate is in?

Nov 15, 2010 at 9:28 PM
Even if you could do this, shapes that overlap could give you results you didn't anticipate. It might be better to have a smart user in the picture somewhere. The calculation isn't hard if you know your lat long. if your lat is > 0, you are N not S. The zones are numbered 1 to 60 in 6 degree intervals starting at -180. So if you have a good representative point the zone is just (long + 180) / 6.


Dec 3, 2013 at 8:19 PM
Using (long + 180) / 6 does not calculate the correct zone. For coordinates in the middle of West Virginia it produces zone 16 when it should be zone 17. I found a few more accurate equations. Not sure if one is better in certain instances or not. There also need to be more logic for special locations like Svalbard and Norway.
(Math.Floor(longitude + 180)/6) + 1
(Math.Floor((longitude + 180)/6) % 60) + 1