[R-sig-Geo] LatLong to UTM zone and coordinates?

Albin Blaschka albin.blaschka at standortsanalyse.net
Sun Jan 1 14:17:58 CET 2012


Am 2012-01-01 12:41, schrieb Albin Blaschka:
> longitude <- 13.34
>
> UTMzone <- (180 + longitude) / 6
> UTMzone <- trunc(UTMzone)
>
> UTMzone

Ups, sorry, a little too quick and too dirty this was...
This should be now the correct answer, still not considering any special 
cases...

longitude <- seq(-180,180)
UTMzone <- (180 + longitude) / 6
UTMzone <- trunc(UTMzone)
UTMzone <- UTMzone + 1
UTMzone

Sorry for the noise,
regards,
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