From f76ace2a985f7bc2b66c57e787165300333ded4e Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 28 Jun 2021 11:51:11 +0200 Subject: [PATCH] Switch from Geography to Geometry meant distances were wrong. --- matcher/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matcher/api.py b/matcher/api.py index 20f7018..46c2427 100644 --- a/matcher/api.py +++ b/matcher/api.py @@ -266,7 +266,7 @@ def get_nearby(bbox, item, max_distance=300): continue tag_filter = get_tag_filter(cls, tag_list) - dist = func.ST_Distance(point, cls.way) + dist = func.ST_DistanceSphere(point, cls.way) q = (cls.query.add_columns(dist.label('distance')) .filter(