GerryChain icon indicating copy to clipboard operation
GerryChain copied to clipboard

Shapely deprecation warning

Open couteau opened this issue 2 years ago • 1 comments

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?

couteau avatar Apr 04 '22 16:04 couteau

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!

InnovativeInventor avatar May 03 '22 20:05 InnovativeInventor