Replies: 3 comments 2 replies
-
The shapefile appears to have a number of issues according to GDAL; in pyogrio it raises a number of warnings when reading the file (there are 29 invalid geometries):
The actual failure happens when the WKB form of the geometry is attempted to be converted into Shapely geometry objects. Is it possible to fix these issues in whatever process produced the shapefile here? Given the invalid geometries would be dropped by any workarounds we can offer here, it would be more ideal to make sure that the shapefile is written with valid geometries instead so you don't lose any data. |
Beta Was this translation helpful? Give feedback.
-
Issue has been raised (and discussed) before in #2791... |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back. Unfortunately, I don't have access to the source geometry, I got this Shapefile delivered as-is. Since it shows up correctly in a tool like https://mapshaper.org/ there should be a way to load these in correctly, even with some LinearRings only having 2 points (or maybe it's wrongly detected as LinearRing?). |
Beta Was this translation helpful? Give feedback.
-
I'm trying to load in a shapefile with GeoPandas, but with both supported engines it currently fails.
To reproduce:
Extract this shapefile: GIS-VMRDH-Areas.zip
Try to run either with pyogrio or fiona engine:
and
Uploading the shapefiles to something like https://mapshaper.org/ or using ArcGIS they are loading fine, without trouble.
I don't think this is a GeoPandas bug, but since it's happening with multiple engines and not with other tools, I'm wondering where the bug is actually happening.
Beta Was this translation helpful? Give feedback.
All reactions