[R-sig-Geo] LL to UTM

Gabor Grothendieck ggrothendieck at gmail.com
Tue Mar 6 13:50:18 CET 2007


Thanks. I looked at spTransform prior to posting but don't understand it.
What I want is to create a function that returns UTM coordinates:

LL2UTM <- function(lat, long, zone = 18) {
...
}

If necessary, zone=18 can be hardcoded in the function and that
arg removed.

I assume that using spTransform its just a one line body. Can
you give me the specific line that it should be?

Thanks.


On 3/6/07, Edzer J. Pebesma <e.pebesma at geo.uu.nl> wrote:
> Gabor,
>
> package rgdal provides an interface to the PROJ.4 library for projection
> of geographical data. Look for the function (or rather method)
> spTransform. It takes any of the spatial classes provided by package sp,
> and afaik any of the known projection systems, including UTM and
> ellipsoids (LL reference "model").
> --
> Edzer
>
> Gabor Grothendieck wrote:
> > I am currently using this web page to convert LL to UTM (and UTM to LL).
> >
> >    http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html
> >
> > All my points are in zone 18.  How would I accomplish the same
> > thing using R?
> >
> > Thanks.
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
>




More information about the R-sig-Geo mailing list