[R-sig-Geo] Writing SpatialPolygonsDataFrame object to an ESRI Shape File format? `
Roger Bivand
Roger.Bivand at nhh.no
Wed Dec 21 21:31:23 CET 2005
On Wed, 21 Dec 2005, Rick Reeves wrote:
> Thanks for earlier help finding the new SpatialPolygons classes..
> My final (for now) question, that I can't answer from various
> documents is:
>
> How to write my SpatialxxxxDataFrame object to an ESRI Shape File?
>
> the previous method I used was:
>
> writeSRDFShape(SRDF, OutputShapeFileRoot)
>
> I have both a SpatialPolygon and SpatialPolygonDataFrame objects to use
> as input...
The functions are wrappers in maptools using sp classes, but because
shapefiles have to have dbf, the easy wrapper takes a
SpatialPolygonDataFrame object:
writePolyShape(obj, file="whatever")
with reading now being readShapePoly()
We haven't managed to write a correct *.prj file yet, but would like to -
I think the code is in GDAL and PROJ.4 with examples in GRASS, but I
haven't done it - help would be welcome!
Best wishes,
Roger
>
> Thanks, RR
>
>
--
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