The Spatial task view on your nearest CRAN does say: "The rgdal package provides bindings to GDAL-supported raster formats and OGR-supported vector formats. It contains functions to write raster files in supported formats. The package also provides PROJ.4 projection support for vector objects ...". A Google search on "R spatial projection" reaches the task view as first hit.
Roger --- Roger Bivand, NHH, Helleveien 30, N-5045 Bergen, roger.biv...@nhh.no -----Original Message----- From: r-sig-geo-boun...@stat.math.ethz.ch on behalf of Agustin Lobo Sent: Wed 2010-06-30 20:25 To: Michael Sumner; b.rowling...@lancaster.ac.uk Cc: r-sig-geo Subject: Re: [R-sig-Geo] mapproject True, thanks. I actually think that I have used spTransform in the past. The problem was that I searched the help system for "reprojection" and "projection", and spTransform did not come up. Maybe both keywords can be included in the documentation of spTransform ? Agus 2010/6/30 Michael Sumner <mdsum...@gmail.com>: > I think rgdal package would be the preferable way. There are some old > and outdated map projection packages (I admittedly do not not the > details, and use rgdal exclusively). > > library(rgdal) > eugrd025DF.laea <- spTransform(eugrd025DF, CRS(projection(Br))) > > spTransform() handles all the details of back and forward transforming > (see inv argument in project) so that valid CRS() projection strings > can be used directly to specify reprojections. > > I'm not intimate yet with the raster package so I might have missed > something that's possible in the way the CRS string is derived by > projection, but if proj4string(eugrd025DF) gives the same value as > projection(eugrd025DF) then the spTransform approach should be fine. > > Cheers, Mike. > > On Wed, Jun 30, 2010 at 10:51 PM, Agustin Lobo <alobolis...@gmail.com> wrote: >> I have a SpPolDF in geographic coordinates (eugrd025DF) and must reproject it >> to the projection of a raster object (Br): >>> projection(eugrd025DF) >> [1] "+proj=longlat +ellps=WGS84" >> >>> projection(Br) >> [1] "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 >> +ellps=GRS80 +units=m +no_defs" >> >> Can I do this with mapproject (package mapproj) os is it better to >> export to shape file, reproject >> with a GIS and import back? If it's possible/convenient, how to write >> the parameters argument >> in mapproject()? >> >> Thanks >> >> _______________________________________________ >> R-sig-Geo mailing list >> R-sig-Geo@stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo >> > _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo