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).
pull/34/head
mei-se 2021-08-29 16:23:50 +02:00 zatwierdzone przez GitHub
rodzic aa1376a2a3
commit f52d3e63ce
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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'