geopandas / dask-geopandas

Parallel GeoPandas with Dask
https://dask-geopandas.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
486 stars 45 forks source link

DeprecationWarning: underlying geometries through the `.data` attribute is deprecated #264

Closed hoxbro closed 6 months ago

hoxbro commented 7 months ago

Our CI has started to emit a DeprecationWarning, coming from dask-geopandas:

https://github.com/geopandas/dask-geopandas/blob/2d0abad32e324a494b34738ab70feb6d78cc0942/dask_geopandas/core.py#L173

  /usr/share/miniconda3/envs/test-environment/lib/python3.9/site-packages/dask_geopandas/core.py:173: DeprecationWarning: Accessing the underlying geometries through the `.data` attribute is deprecated and will be removed in GeoPandas 1.0. You can use `np.asarray(..)` or the `to_numpy()` method instead.
  Note that if you are using PyGEOS and using this attribute to get an array of PyGEOS geometries, those other methods will always return an array of Shapely geometries. Accessing the underlying PyGEOS geometries directly is deprecated, and you should migrate to use Shapely >= 2.0 instead.

There is no urgency in this for me, but couldn't find an issue about it.

martinfleis commented 6 months ago

Yeah, we need to do a general sync with geopandas now that 1.0 is coming and brining a ton of deprecations. I suppose this will not be the only one affecting dask-geopandas. But thanks for heads up!