[Rspatial-devel] spTransform
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Fri Apr 19 15:17:14 CEST 2013
spTransform is currently defined, both as S4 and S3 methods, in rgdal. I
try to export it in spacetime (for ST objects), but this doesn't work
because rgdal is not imported (I'd like to avoid dependence on rgdal).
My suggestion is to:
add the definition of the S4 generic to sp, and have sp export it, but
not provide methods for it.
This works, but will lead to all kind of warnings when loading rgdal,
caused by the S3 methods. So my second suggestion is:
remove all S3 definitions & exports of spTransform from rgdal. After
that, all three work happily together:
> library(rgdal)
Loading required package: sp
rgdal: version: 0.8-6, (SVN revision 453M)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.9.2, released 2012/10/08
Path to GDAL shared files: /usr/share/gdal/1.9
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: (autodetected)
> library(spacetime)
> showMethods(spTransform)
Function: spTransform (package sp)
x="SpatialGridDataFrame", CRSobj="CRS"
x="SpatialLines", CRSobj="CRS"
x="SpatialLinesDataFrame", CRSobj="CRS"
x="SpatialPixelsDataFrame", CRSobj="CRS"
x="SpatialPoints", CRSobj="CRS"
x="SpatialPointsDataFrame", CRSobj="CRS"
x="SpatialPolygons", CRSobj="CRS"
x="SpatialPolygonsDataFrame", CRSobj="CRS"
x="ST", CRSobj="CRS"
I committed both to r-forge.
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the Rspatial-devel
mailing list