[R-sig-Geo] Changes in the sp package
Roger Bivand
Roger.Bivand at nhh.no
Wed Jan 13 19:48:43 CET 2010
A number of changes have been made in the sp package which may affect
users. Version 0.9-56 is now on CRAN and is the first release containing
the changes.
The changes involve the creation of Polygon, Polygons, and SpatialPolygons
objects in C rather than R code, and in the exposure of these C functions
to other packages (less important for now). I see speedups of about four
times in reading large polygon shapefiles in readOGR() in rgdal, and
similarly in readShapeSpatial() in maptools (which remains slower),
because the sp instantiation functions called there also call the C
functions inside sp.
They have been tried out following an announcement on this list last
month:
https://stat.ethz.ch/pipermail/r-sig-geo/2009-December/007224.html
with no significant problems reported. The only visible change appears to
be the names of the dimensions in the bounding box of SpatialPolygons
objects, which now are c("x", "y").
Thanks to Micah Altman, the "[" subsetting method for
SpatialPolygonDataFrame objects has also been speeded up, again by about
4x - this does not involve C code.
If changes are noticed, please contact me directly with a reproducible
example.
Thanks in advance for your cooperation,
Roger
--
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