ImperialCollegeLondon / ImperialCollegeLondon/SWMManywhere
`geopandas` warning
- Dominant language
- Python
- Stars
- 51
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
```
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:
```yml
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]
```
Contributor guide
Research direction
Reproduce the warning using the configuration shown in the issue, then inspect the reported call at pyogrio/geopandas.py:523 and the surrounding SWMManywhere entry point. Done should mean the triggering configuration no longer emits this warning without changing the resulting geometry handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100