SpatioTemporal / STAREPandas

STAREpandas adds SpatioTemporal Adaptive Resolution Encoding (STARE) support to pandas DataFrames. https://starepandas.readthedocs.io/en/latest/
MIT License
5 stars 1 forks source link

make_trixles() trows shapely 2.0 warning #75

Closed NiklasPhabian closed 2 years ago

NiklasPhabian commented 2 years ago
sids = [4611686018427387903, 4611686018427387903]
sdf = starepandas.STAREDataFrame(sids=[sids])
trixels = sdf.make_trixels()

sdf = sdf.set_trixels(trixels)

The last row causes this warning:

pandas/core/dtypes/cast.py:1981: ShapelyDeprecationWarning: __len__ for multi-part geometries
 is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` 
property instead to get the number of parts of a multi-part geometry.
  result[:] = values

printing the sdf, causes another error:

print(sdf)
pandas/core/dtypes/inference.py:383: ShapelyDeprecationWarning: Iteration over 
multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the `geoms` 
property to access the constituent parts of a multi-part geometry.
 iter(obj)  # Can iterate over it.
NiklasPhabian commented 2 years ago

pegging to shapely 1.7 until https://github.com/geopandas/geopandas/pull/2275 is closed