Cast Point to Geography

This commit is contained in:
Edward Betts 2023-10-31 15:35:18 +00:00
parent d8cc6c7480
commit 82671959bb

View file

@ -110,7 +110,9 @@ def make_envelope_around_point(
"""Make an envelope around a point, the distance parameter specifies the size."""
conn = database.session.connection()
p = sqlalchemy.func.ST_MakePoint(lon, lat)
p = sqlalchemy.sql.expression.cast(
sqlalchemy.func.ST_MakePoint(lon, lat), geoalchemy2.Geography
)
s = select(
[