[R-sig-Geo] newbie questions

Roger Bivand Roger.Bivand at nhh.no
Mon Nov 16 15:01:55 CET 2009


On Mon, 16 Nov 2009, Karl Ove Hufthammer wrote:

> On Sun, 15 Nov 2009 19:52:48 +0100 (CET) Roger Bivand
> <Roger.Bivand at nhh.no> wrote:
>> Do use readShapeSpatial() (or better readOGR() in rgdal)
>
> Why (or how) is readOGR better?

Because it uses OGR, with an updated rather than frozen shapelib, and 
reads the *.prj file of the shapefile bundle as well, which 
readShapeSpatial() does not. On the other hand, readShapeSpatial() has 
various extra arguments to tackle out-of-spec shapefile bundles.

With reference to other alternatives, the shapefiles package has not been 
updated for three years, and importShapefile() in PBSmapping is built 
around read.shape() from maptools to read into the classes used in that 
package.

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