-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When running pytrajplot test with the tests/test_pytrajplot.sh script, the following warning messages appear:
<conda-env-prefix>/lib/python3.11/site-packages/shapely/creation.py:119: RuntimeWarning: invalid value encountered in linestrings
Here's what GitHub Copilot says:
You get the warning
shapely/creation.py:119: RuntimeWarning: invalid value encountered in linestrings
because Shapely is trying to create a LineString geometry, but the coordinates you provided contain invalid values—most commonly NaN, None, or inf. This usually happens if your input trajectory data has missing or corrupted longitude/latitude values.
How to fix:
Check your input files (e.g., in zero_lon_from_east, zero_last_lon, etc.) for missing or non-numeric coordinate values. Clean or filter out any rows with invalid data before passing them to pytrajplot.