ImperialCollegeLondon / SWMManywhere

SWMManywhere is used to derive and simulate a sewer network anywhere in the world
https://imperialcollegelondon.github.io/SWMManywhere/
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

`geopandas` warning #264

Open barneydobson opened 1 month ago

barneydobson commented 1 month ago
2024/08/23 10:07:03 | graphfcn: remove_non_pipe_allowable_links completed.
C:\Users\bdobson\Anaconda3\envs\sa\Lib\site-packages\pyogrio\geopandas.py:523: UserWarning: GeoSeries.notna() previously returned False for both missing (None) and empty geometries. Now, it only returns False for missing values. Since the calling GeoSeries contains empty geometries, the result has changed compared to previous versions of GeoPandas.
Given a GeoSeries 's', you can use '~s.is_empty & s.notna()' to get back the old behaviour.

To further ignore this warning, you can do:
import warnings; warnings.filterwarnings('ignore', 'GeoSeries.notna', UserWarning)
  has_z_arr = geometry[geometry.notna() & (~geometry.is_empty)].has_z

Can be triggered with:

base_dir: C:\Users\bdobson\Documents\data\swmmanywhere
project: temp
extension: json
bbox: [5.15735581e-02, 5.15591821e+01, 9.82559111e-02, 5.16043375e+01]