Switch from Geography to Geometry meant distances were wrong.

This commit is contained in:
Edward Betts 2021-06-28 11:51:11 +02:00
parent 238fbeef05
commit f76ace2a98

View file

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