[R-sig-Geo] converting lat long points to UTM

Michael Sumner mdsumner at gmail.com
Tue Mar 1 03:54:31 CET 2011


The rgdal package has the project() function for direct conversion
to/from longlat (WGS84) - via the PROJ.4 library, via GDAL - all
embedded in the package.

library(rgdal)
xy <- cbind(c(118, 119), c(10, 50))
project(xy, "+proj=utm +zone=51 ellps=WGS84")
          [,1]    [,2]
[1,] -48636.65 1109577
[2,] 213372.05 5546301

Be aware that that is a very minimal "PROJ.4" string (metres is
assumed), and that "+proj=longlat +ellps=WGS84" is the assumed base
coordinate system.

FYI, in sp, there is spTransform() which can wrap the required
back-projection and perform reprojections for more complicated data
sets.

See ?project and ?spTransform

Cheers, Mike.

On Tue, Mar 1, 2011 at 1:45 PM, Arnold Salvacion
<arnold_salvacion at yahoo.com> wrote:
> Dear Colleagues,
> Good day!
> I have a data points collected using GPS..It was on latitude and longitude coordinate system ..I wonder if there's any function in R where I could convert those GPS data points to UTM (e.g. UTM Zone 51N)?
> Thanks in advance
> Arnold
>
>
>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>



-- 
Michael Sumner
Institute for Marine and Antarctic Studies, University of Tasmania
Hobart, Australia
e-mail: mdsumner at gmail.com



More information about the R-sig-Geo mailing list