From f52d3e63ce130dd4c83919d162a97d7df9e58fe6 Mon Sep 17 00:00:00 2001 From: mei-se <74541185+mei-se@users.noreply.github.com> Date: Sun, 29 Aug 2021 16:23:50 +0200 Subject: [PATCH] fix issue when querying within a polygon The `parse_query` function checked whether the `query` parameter was of type `Polygon` or `MultiPolygon`, while the underlying library expected a `GeoDataFrame` (which is also what `get_perimeter` returns). --- prettymaps/draw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prettymaps/draw.py b/prettymaps/draw.py index ed6bb63..2c00ed2 100644 --- a/prettymaps/draw.py +++ b/prettymaps/draw.py @@ -106,7 +106,7 @@ def plot_shapes(shapes, ax, vsketch = None, palette = None, **kwargs): # Parse query (by coordinates, OSMId or name) def parse_query(query): - if isinstance(query, (Polygon, MultiPolygon)): + if isinstance(query, GeoDataFrame): return 'polygon' elif isinstance(query, tuple): return 'coordinates'