[Qgis-user] Dealing with defective polygons.

Marcos Marvá marcos.marva at gmail.com
Wed May 11 09:40:18 PDT 2016


Hi;
I am working with this shapefile
<https://www.dropbox.com/s/dr8acy287brfk5r/900VCWTKZU.zip?dl=0> (voting
districts in Madrid, Spain) in R. I have got an error (see below, please)
and went to QGIS trying to fix it.  I've gone to QGIS and checked the
validity of geometry and founf the defective polygon, but I can not fix the
problem (I can not delete the polygon, even if I would prefer not to delete
it). Can anybody help me?
Thanks!


After running the following code

library(rgdal)
library(rgeos)
cam = readOGR(dsn=".", layer="200001490")

library(gpclib)
library(maptools)
library(ggplot2)
library(dplyr)

gpclibPermit()

cam at data$id = rownames(cam at data)
cam.points = fortify(cam, region="id")

I've got the following error


Error: IllegalArgumentException: Invalid number of points in LinearRing
found 3 - must be 0 or >= 4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160511/a7d0a9cb/attachment.html>


More information about the Qgis-user mailing list