Skip to content
Prev 10305 / 29559 Next

Suggestion: option overwrite=T for writeOGR()

Roger,

It does not for me. The error is solved by deleting files xygcatLO.* ,
while directory xygcatLO may continue to exist.

Also, I've found that with this version the below command does not
save the files within
the folder indicated by dsn, but outside. This was not the case in the
past, but do not know if this is
because of a change in rgdal, gdal or ubuntu 10.04 (I've changed all 3
since the last time I used writeOGR()).
Error in writeOGR(xygcatLO, dsn = "xygcatLO", layer = "xygcatLO",
driver = "ESRI Shapefile") :

	GDAL Error 1: Layer 'xygcatLO' already exists
Calls: writeOGR -> .Call
R version 2.12.0 (2010-10-15)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8          LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8           LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8       LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8          LC_NAME=en_US.utf8
 [9] LC_ADDRESS=en_US.utf8        LC_TELEPHONE=en_US.utf8
[11] LC_MEASUREMENT=en_US.utf8    LC_IDENTIFICATION=en_US.utf8

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

other attached packages:
[1] RANN_2.1.2      outliers_0.13-3 rgdal_0.6-30    raster_1.7-2
[5] sp_0.9-73       rkward_0.5.4

loaded via a namespace (and not attached):
[1] grid_2.12.0     lattice_0.19-13 tools_2.12.0
2010/12/10 Roger Bivand <Roger.Bivand at nhh.no>: