Skip to content

Commit

Permalink
fix: add missing geojson to geom explicit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
edelclaux committed Jul 5, 2024
1 parent 22b773a commit 91b9778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/gn_module_zh/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def set_geom(geometry, id_zh=None):
if zh.id_zh != id_zh:
zh_geom = DB.session.scalar(select(func.ST_GeogFromWKB(func.ST_AsEWKB(zh.geom))))
polygon_geom = DB.session.scalar(
select(func.ST_GeogFromWKB(func.ST_AsEWKB(str(geometry))))
select(func.ST_GeogFromWKB(func.ST_AsEWKB(func.ST_GeomFromGeoJSON(str(geometry)))))
)
if DB.session.scalar(select(func.ST_Intersects(polygon_geom, zh_geom))):
if DB.session.scalar(
Expand Down

0 comments on commit 91b9778

Please sign in to comment.