[OpenLayers-Users] Find UTM Zone from x,y

Leandro R learonco at gmail.com
Fri Oct 26 09:41:38 EDT 2007


Hello!!
Take a look at this email, from the PostGIS mailing list:
http://www.nabble.com/function-to-find-UTM-zone-SRID-from-POINT-tf669268.html#a1772300

Hope this help
Leandro



2007/10/26, Barend Köbben <kobben at itc.nl>:
>
> Hi Linda,
>
> I think your question starts with a basic mis-assumption:
>
> > Basically if I pass in the x,y coordinates in WGS_84 or any other meter
> > projection
>
> WGS84 is a officially a Datum, not a projection. A Datum is a global or
> ellipsoidal object closely matching the Earth's shape. A projection is
> literaly what it says: a projection of that global object on a flat
> surface.
>
> (for a good overview, I suggest http://kartoweb.itc.nl/geometrics/)
>
> What most people mean if they say "WGS84 projection" is "Geographic
> coordinates (in latitude, longitude) on the WGS_84 Datum". Therefore it's
> coordinates are NOT x,y but lat,lon  and it's NOT a meter projection but a
> (decimal) degrees description of a vector to a point on the surface of a
> global object (actually the lat and lon are angles with respect to the
> globe's origin...).
> In more simpel terms: lat,lon does not have a cartesian grid with an
> origin
> and equal values along two axes as its mathematical basis, as the UTM and
> other (meter) projections have.
>
> > I would like it to return the zone that those coordinates are in.
> You can easily do that if indeed you have lat,lon coordinates as described
> above. As the zones of UTM are just 60 zones divided over the 360 degrees
> of
> longitude, each zone is 360/60=6 degrees of longitude. Zone 1 is from -180
> to 174, zone 31 is from 0 (Greenwich) to 6, etcetera. The zones each have
> a
> N-S divide over the equator, so if the latitude is positive, the zone is
> zone xN, if negative it's zone xS.
> So my city Enschede is at lat,lon= 52.2166667 , 6.9 and therefore in zone
> 31N.
>
> For "any other meter projection" it's not so easy, because the projections
> all use different origins of their grid. The best is to calculate the
> projected x,y back to lat,lon on the WGS84 (in PROJ4-based systems use the
> toWGS84 part of the projection description) and then to the UTM zone...
>
> Yours,
> __
> Barend Köbben
> International Institute for Geo-information
> Sciences and Earth Observation (ITC)
> PO Box 6, 7500AA Enschede (The Netherlands)
> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071026/cf842ca6/attachment.html


More information about the Users mailing list