[R-sig-Geo] ring not closed - readShapePoly - read.shape - maptools
Patrick Giraudoux
patrick.giraudoux at univ-fcomte.fr
Thu Dec 28 16:33:17 CET 2006
Hi,
I have slept on some data of a project which started in 2003 and just
coming back on them today gives the opportunity to compare read.shape
(shapefiles were initially imported with this function) and
readShapePoly (the new one sp style). The latter will be much more
interesting for the next step, giving directed handling to overlay methods.
Importing one of my shapefile with read.shape ( read as polyshape in
ArcGIS) made (and still makes) no problem. However, when I try to import
it again via readShapePoly, I get this message:
> UG<-readShapePoly("U:/Documents and Settings/giraudoux/Mes
documents/FC25/NewSIG050317/UG.shp")
Error in validityMethod(object) : ring not closed
Clear enough: at least one of the polygons is not closed... which is
confirmed by the fact that I can import the shapefile easy with
readShapeLines. I suppose the readShapePoly is more demanding in
validity control than the older read.Shape and ArcGIS: one cannot
complain for that.
I am not afraid of sorting this out with some lines of programme. I have
however a question before writing it: is there already a function making
a check somewhere which could be used to know which one(s) of the
polygons are not closed?
Patrick
More information about the R-sig-Geo
mailing list