Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapely deprecation warning #392

Closed
couteau opened this issue Apr 4, 2022 · 1 comment · Fixed by #405
Closed

Shapely deprecation warning #392

couteau opened this issue Apr 4, 2022 · 1 comment · Fixed by #405

Comments

@couteau
Copy link

couteau commented Apr 4, 2022

Graph raises the following deprecation warning when assigning ids to geometries for purposes of calculating adjacency:

... /gerrychain/graph/adjacency.py:21: ShapelyDeprecationWarning: Setting custom attributes on geometry objects is deprecated, and will raise an AttributeError in Shapely 2.0
  geometries[i].id = I

Another method of tracking geometry identity should be developed before any migration to Shapely 2.0 is undertaken. Perhaps a dict?

@InnovativeInventor
Copy link
Member

Graph raises the following deprecation warning when assigning ids to geometries for purposes of calculating adjacency:

... /gerrychain/graph/adjacency.py:21: ShapelyDeprecationWarning: Setting custom attributes on geometry objects is deprecated, and will raise an AttributeError in Shapely 2.0
  geometries[i].id = I

Another method of tracking geometry identity should be developed before any migration to Shapely 2.0 is undertaken. Perhaps a dict?

Yep, this is an issue. Contributions are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants