From 58e27bd9d6adf558fa5c8686f1212f1501e6cc34 Mon Sep 17 00:00:00 2001 From: mfbehrens99 Date: Wed, 10 Mar 2021 11:32:25 +0100 Subject: [PATCH] Support for coordinates --- code/draw.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/draw.py b/code/draw.py index e3329dc..38043e6 100644 --- a/code/draw.py +++ b/code/draw.py @@ -117,7 +117,8 @@ def plot( zorder_streets = None, zorder_building = None, # Whether to fetch data using OSM Id - by_osmid = False + by_osmid = False, + by_coordinates = False, ): ############# @@ -125,7 +126,9 @@ def plot( ############# # Geocode central point - if not by_osmid: + if by_coordinates: + point = (float(query.split(",")[0].strip()), float(query.split(",")[1].strip())) + elif not by_osmid: point = ox.geocode(query) # Fetch perimeter