[R-sig-Geo] spTransform: datum syntax?

Roger Bivand Roger.Bivand at nhh.no
Thu Dec 6 16:31:41 CET 2007


On Thu, 6 Dec 2007, Agustin Lobo wrote:

> Dear list,
>
> I have to transform the datum of an spatial object.
> First, I create the object with:
> pressp <- SpatialPointsDataFrame(pres[,c(10,6)], data=pres[,c(1,2,11)],
> +                proj4string = CRS("+proj=longlat +ellps=WGS84"))
>
> Then I have to transform to UTM but using the International or Hayford
> datum.
>
> The following works:
> presspUTM <- spTransform(pressp, CRS("+proj=utm +zone=31))
>
> but then I keep WGS84.
>
> The following also works:
> presspUTM <- spTransform(pressp, CRS("+proj=utm +zone=31 +datum=NAD27"))
>
> but this is not the datum I want
>
> Then I've tried:
> presspUTM <- spTransform(pressp, CRS("+proj=utm +zone=31 +datum=ED50"))
> presspUTM <- spTransform(pressp, CRS("+proj=utm +zone=31
> +datum=International"))
> presspUTM <- spTransform(pressp, CRS("+proj=utm +zone=31 +datum=Int"))
> presspUTM <- spTransform(pressp, CRS("+proj=utm +zone=31 +datum=Hayford"))
>
> and many other similar names, also tried with ellps=
>
> The doc refers to the proj.4 doc, but cannot find any list of datums
> there, including the pdf docs of proj.4

projInfo("datum")

but the problem is to find the actual datum for the ellipse:

projInfo("ellps")

you need. You can move to "+ellps=intl", but finding the three or seven 
parameter +towgs84= values is more difficult. The Grids & Datums column 
at: http://www.asprs.org/resources/grids/ is often a good place to start.

You can search in the output data frame from:

EPSG <- make_EPSG()

too, but you'd need to know more about the target coordinate reference 
system.

Roger

>
> Does anyone know where I could find a list of supported datums in proj.4
> and their correct names for the +datum= argument?
>
> Thanks!
>
> Agus
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list