You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! This is an amazing library and I have really enjoyed working with it. I have come across an issue I haven't been able to root cause. Some of the shapefiles I have used (such as: https://geodata.lib.berkeley.edu/catalog/ark28722-s7d02x) will have an IndexError during if self._open_edges[index] == edge, where the index is -1 (calculated from index = self._index(p1, p2, edge) - 1 in the delete function of class OpenEdges. I have been unable to figure out why some shapefiles would lead to this. I have examined and cleaned the polygons closely in QGIS. Any ideas on how to overcome this?
The text was updated successfully, but these errors were encountered:
Hi man, I encoutered the same problem while using polygons extracted from QGIS. self._open_edges gave an empty list sometimes.
My solution was to change the code to: def delete(self, p1, p2, edge): index = self._index(p1, p2, edge) - 1 if self._open_edges: if self._open_edges[index] == edge: del self._open_edges[index]
Hi! This is an amazing library and I have really enjoyed working with it. I have come across an issue I haven't been able to root cause. Some of the shapefiles I have used (such as: https://geodata.lib.berkeley.edu/catalog/ark28722-s7d02x) will have an IndexError during
if self._open_edges[index] == edge
, where the index is -1 (calculated fromindex = self._index(p1, p2, edge) - 1
in the delete function ofclass OpenEdges
. I have been unable to figure out why some shapefiles would lead to this. I have examined and cleaned the polygons closely in QGIS. Any ideas on how to overcome this?The text was updated successfully, but these errors were encountered: