I want to error check incoming lat/lng points by checking if the point resides within the given UTM zone. (This would work for the data im using because sometimes there is a missing sign or lat/lng is reversed and the UTM zone can still be correct)
So given a UTM zone, how would you find the bounding coordinates for that zone?(Either the lat/lng for SW and NE corners or a range of lat/lng values for a given zone)
Also: Since I am supplied with both UTM and lat/lng I can convert both and cross compare as a way to validate incoming points but I thought it would be interesting to know how to calculate a UTM zone's bounding box in lat/lng form just given a zone (and possibly a hemisphere).
Answer
I'm not sure what environment you're working in, but because UTM zones are referenced to a unique central meridian, the longitude of a point should be within +/- three degrees centered on the central meridian of your target UTM zone.
Regarding a projectable/renderable bounding box of a UTM zone, ESRI datasets that come with ArcGIS should contain a UTM zone shapefile, but you could also roll your own pretty easily. The northing coordinates will always be 180/-180, and simply walk your way through every 6th line of longitude, and there are of course 60 zones in the world.
You'd have to watch out for the exceptions Dan mentions in his comment as well as the polar zones which @whuber pointed out.
No comments:
Post a Comment