Hello!!<br>Take a look at this email, from the PostGIS mailing list:<br><a href="http://www.nabble.com/function-to-find-UTM-zone-SRID-from-POINT-tf669268.html#a1772300">http://www.nabble.com/function-to-find-UTM-zone-SRID-from-POINT-tf669268.html#a1772300
</a><br><br>Hope this help<br>Leandro<br><br><br><br><div><span class="gmail_quote">2007/10/26, Barend Köbben &lt;<a href="mailto:kobben@itc.nl">kobben@itc.nl</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Linda,<br><br>I think your question starts with a basic mis-assumption:<br><br>&gt; Basically if I pass in the x,y coordinates in WGS_84 or any other meter<br>&gt; projection<br><br>WGS84 is a officially a Datum, not a projection. A Datum is a global or
<br>ellipsoidal object closely matching the Earth&#39;s shape. A projection is<br>literaly what it says: a projection of that global object on a flat surface.<br><br>(for a good overview, I suggest <a href="http://kartoweb.itc.nl/geometrics/">
http://kartoweb.itc.nl/geometrics/</a>)<br><br>What most people mean if they say &quot;WGS84 projection&quot; is &quot;Geographic<br>coordinates (in latitude, longitude) on the WGS_84 Datum&quot;. Therefore it&#39;s<br>coordinates are NOT x,y but lat,lon&nbsp;&nbsp;and it&#39;s NOT a meter projection but a
<br>(decimal) degrees description of a vector to a point on the surface of a<br>global object (actually the lat and lon are angles with respect to the<br>globe&#39;s origin...).<br>In more simpel terms: lat,lon does not have a cartesian grid with an origin
<br>and equal values along two axes as its mathematical basis, as the UTM and<br>other (meter) projections have.<br><br>&gt; I would like it to return the zone that those coordinates are in.<br>You can easily do that if indeed you have lat,lon coordinates as described
<br>above. As the zones of UTM are just 60 zones divided over the 360 degrees of<br>longitude, each zone is 360/60=6 degrees of longitude. Zone 1 is from -180<br>to 174, zone 31 is from 0 (Greenwich) to 6, etcetera. The zones each have a
<br>N-S divide over the equator, so if the latitude is positive, the zone is<br>zone xN, if negative it&#39;s zone xS.<br>So my city Enschede is at lat,lon= 52.2166667 , 6.9 and therefore in zone<br>31N.<br><br>For &quot;any other meter projection&quot; it&#39;s not so easy, because the projections
<br>all use different origins of their grid. The best is to calculate the<br>projected x,y back to lat,lon on the WGS84 (in PROJ4-based systems use the<br>toWGS84 part of the projection description) and then to the UTM zone...
<br><br>Yours,<br>__<br>Barend Köbben<br>International Institute for Geo-information<br>Sciences and Earth Observation (ITC)<br>PO Box 6, 7500AA Enschede (The Netherlands)<br>ph: +31 (0)53 4874253; fax: +31 (0)53 4874335<br>
<br><br><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users
</a><br></blockquote></div><br>