Closed frnsys closed 3 years ago
It looks like the issue is actually because of geopandas--adding the index
attribute to geopandas geometries didn't persist. Creating a separate geometry list out of the geopandas geometries seems to work ok.
I'm closing this PR due to https://github.com/mggg/maup/issues/29. Let me know if you want me to re-open this (or if you have another PR that you want me to look at)!
When using Shapely 1.7.1
IndexedGeometries.query
fails because the assignedgeom.index
values don't persist.Shapely documentation suggests building your own index:
The problem with this particular approach is that using
id
is unreliable--multiple objects may have the sameid
throughout the lifecycle of a program.Instead I'm using a kind of ugly way to generate a hash for a given geometry.