diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-05-28 22:11:47 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-05-28 22:11:47 -0400 |
| commit | 920701c4240c0c3f5ef4e172332699bfb3a8fb1c (patch) | |
| tree | 6fad7650ff8cd580b80b874d7d1ca546eb271771 /lib/stitches/auto_fill.py | |
| parent | 2307fcd19021b265b91556a476c11ff120de2799 (diff) | |
suppress annoying shapely warning
Diffstat (limited to 'lib/stitches/auto_fill.py')
| -rw-r--r-- | lib/stitches/auto_fill.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py index 96874211..03930ddd 100644 --- a/lib/stitches/auto_fill.py +++ b/lib/stitches/auto_fill.py @@ -7,6 +7,7 @@ import math from itertools import chain, groupby +import warnings import networkx from shapely import geometry as shgeo @@ -359,7 +360,10 @@ def process_travel_edges(graph, fill_stitch_graph, shape, travel_edges): # allows for building a set of shapes and then efficiently testing # the set for intersection. This allows us to do blazing-fast # queries of which line segments overlap each underpath edge. - strtree = STRtree(segments) + with warnings.catch_warnings(): + # We know about this upcoming change and we don't want to bother users. + warnings.filterwarnings('ignore', 'STRtree will be changed in 2.0.0 and will not be compatible with versions < 2.') + strtree = STRtree(segments) # This makes the distance calculations below a bit faster. We're # not looking for high precision anyway. |
