[R] simplify shapefile and save output

jm8360 meadejess at googlemail.com
Wed Apr 18 10:21:25 CEST 2012


I have several large shapefiles that I need to use to draw a map.
I want to simplify the files and then save the output so that I can use them
again.

The methods that I have tried do not allow me to save the simplified output
as a shapefile.
I have tried:
thinnedSpatialPoly in the package maptools, but I understand that you cannot
save the output as a shapefile because the topographical features are not
preserved.

I have also tried 

Antarctica2<-gSimplify(Antarctica,tol=0.1,topologyPreserve=TRUE)
> write.shapefile(Antarctica2, "Antarctica2_simple")
Error in shapefile$shp : no $ method for object without attributes

but it doesn't work either,

I tried simplifying the shapefiles using simplify in geospatial modelling
environment, but R would not read in the resulting files and gave this error
message:
Error in `rownames<-`(`*tmp*`, value = c("27", "67", "109", "723", "963",  : 
  attempt to set rownames on object with no dimensions

Any help would be gratefully received,
bw


--
View this message in context: http://r.789695.n4.nabble.com/simplify-shapefile-and-save-output-tp4567029p4567029.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list