[R-sig-Geo] R crash with readOGR

caspar hallmann caspar.hallmann at gmail.com
Fri Feb 12 14:38:31 CET 2010


Dear All,

Perhaps one can help me with the obvious, however I have been trying
to import a shapefile using function readOGR as in:
myshp<-readOGR("mydirectorypath", "shapefilename"), and without any
warning (e.g. can't allocate memory size or something trivial) R
crashes en shuts down. The shapefile itself does not seem too large
though ( 42mb the .shp alone).
I wonder if anyone has encountered the same problem, or beter, the solution.
For now, I have resorted to importing the .dbf of the shapefile (works
fine), then converting it to some preferred spatial format. However,
since now I am required to manually set the CRS this pretty much
prevents me from applying batch analysis on a range of shapesfile
differing in their CRS's. Note that the .prj are present, and would
like to take advantage of readOGR's capability of recognizing the CRS
of each shapefile.

Thanks in advance

Caspar

PS: BTW: Is there a function like ''readprj()'' around ?
PS2: sessionInfo:
R version 2.10.1 (2009-12-14)
i386-pc-mingw32

locale:
[1] LC_COLLATE=Dutch_Netherlands.1252  LC_CTYPE=Dutch_Netherlands.1252
   LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C
[5] LC_TIME=Dutch_Netherlands.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] RSAGA_0.9-6     rgdal_0.6-24    maptools_0.7-29 lattice_0.18-3
sp_0.9-57       foreign_0.8-39

loaded via a namespace (and not attached):
[1] grid_2.10.1  proj4_1.0-4  tools_2.10.1
>



More information about the R-sig-Geo mailing list