Skip to content
Prev 22424 / 29559 Next

Error importing ESRI Shapefile

On Tue, 10 Mar 2015, Alec Friedhoff wrote:

            
This detail helps, but does not provide a reproducible example. The error 
message said: "infinite label point" which comes from a validity check on 
a Polygon or possibly Polygons object. The C code in the sp package, 
called from rgdal, computes the centroid, but appears here to fail because 
the area of the polygon is not close to zero. Close to zero cases (a 
repeated point trying to pretend to be a polygon, or a short line doing 
the same) are covered. This means that your polygon is the first ever 
encountered in this unusual state. Either make the offending shapefile 
available on a public server and post the link, or contact me off-list 
with that link, or with a zip archive of the shapefile attached, again 
off-list. I'll try to see whether additional logic can be added to 
identify the bad geometries.

Roger