[R-sig-Geo] LatLong to UTM zone and coordinates?
Albin Blaschka
albin.blaschka at standortsanalyse.net
Sun Jan 1 12:41:14 CET 2012
Am 2012-01-01 02:57, schrieb Yaniv Brandvain:
> So, what is the best way to find the correct UTM zones for each lat-long
> entry when data spans zones across the globe. Once you get the right zone,
> it seems straightforward to get coordinates, but I haven't found a function
> that gives the right zone. But the answers from spTransform are definitely
> incorrect as you move away from the equator unless you hand it the correct
> zone.
>
Hello!
Mhmm, if I understand you correctly...
The UTM system divides the surface of Earth between 80°S and 84°N
latitude into 60 zones, each 6° of longitude in width. Zone 1 covers
longitude 180° to 174° W; zone numbering increases eastward to zone 60
that covers longitude 174 to 180 East.
So, quick and dirty, not thinking about special cases and so on, is this
what you are looking for?
longitude <- 13.34
UTMzone <- (180 + longitude) / 6
UTMzone <- trunc(UTMzone)
UTMzone
Some background, if necessary: http://www.dmap.co.uk/utmworld.htm
Happy New Year!
Albin
--
| Albin Blaschka, Mag.rer.nat.
| Etrichstrasse 26, A-5020 Salzburg
| * www.albinblaschka.info * www.thinkanimal.info *
| - It's hard to live in the mountains, hard but not hopeless!
More information about the R-sig-Geo
mailing list