From b81a23b9355825e96489ba8d403409e1cd6ef26b Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Wed, 31 Jan 2024 14:13:49 +0100 Subject: [PATCH] Fixed bug --- api/routers/edr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/routers/edr.py b/api/routers/edr.py index c5486297..1194f8f2 100644 --- a/api/routers/edr.py +++ b/api/routers/edr.py @@ -30,9 +30,10 @@ # Maybe it would be better to only query a limited set of data instead of everything (meaning 24 hours) async def get_locations(bbox: str = Query(..., example="5.0,52.0,6.0,52.1")) -> FeatureCollection: # Hack to use string left, bottom, right, top = map(str.strip, bbox.split(",")) + print("bbox: {}".format(bbox)) poly = geometry.Polygon([(left, bottom), (right, bottom), (right, top), (left, top)]) ts_request = dstore.GetObsRequest( - filter=dict(instruments=dstore.Strings(values=["tn"])), # Hack + filter=dict(instrument=dstore.Strings(values=["tn"])), # Hack inside=dstore.Polygon(points=[dstore.Point(lat=coord[1], lon=coord[0]) for coord in poly.exterior.coords]), )