Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to convert a latlong point to UTM. To define UTM projection, I need to calculate zone for the point. I am trying to figure out the best way to do this. One way to do this would be use longitude values to find the proper zone. This would require lot of coding. I am curious if there is a better way of doing this.

Thanks

share|improve this question
1  
You could always do a Select By Location function and select the polygon UTM Zone that the point is located inside of. –  MLowry Aug 9 '11 at 15:44
    
Do you need to consider all possible UTM zones (such as polar zones, etc.) or do you just want the mid-latitude zones? The latter are a simple calculation because they are evenly spaced every six degrees from -180 to +180. –  whuber Aug 9 '11 at 15:52

1 Answer 1

up vote 12 down vote accepted

It's not that difficult, even if you handle the zones around Svalbard and Norway. Here's an example:

ZoneNumber = floor((LongTemp + 180)/6) + 1;

if( Lat >= 56.0 && Lat < 64.0 && LongTemp >= 3.0 && LongTemp < 12.0 )
    ZoneNumber = 32;
endif
// Special zones for Svalbard
if( Lat >= 72.0 && Lat < 84.0 ) 
  if  ( LongTemp >= 0.0  && LongTemp <  9.0 ) 
    ZoneNumber = 31;
  elseif( LongTemp >= 9.0  && LongTemp < 21.0 )
    ZoneNumber = 33;
  elseif(LongTemp >= 21.0 && LongTemp < 33.0 )
    ZoneNumber = 35;
  elseif(LongTemp >= 33.0 && LongTemp < 42.0 ) 
    ZoneNumber = 37;
  endif
 endif

Convert Latitude/Longitude to UTM (attributed to Chuck Gantz).

I haven't tried this specific code, but the algorithm looks correct.

share|improve this answer
    
This is great, Thanks –  jayGIS Aug 9 '11 at 16:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.