Skip to content

Commit

Permalink
fix: add geojson to geom conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
edelclaux committed Jul 3, 2024
1 parent eaa163a commit f846b95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/gn_module_zh/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ def set_geom(geometry, id_zh=None):
.where(
func.ST_Intersects(
func.ST_GeogFromWKB(func.ST_AsEWKB(TZH.geom)),
func.ST_GeogFromWKB(func.ST_AsEWKB(str(geometry))),
func.ST_GeogFromWKB(func.ST_AsEWKB(func.ST_GeomFromGeoJSON(str(geometry)))),
)
)
.where(
func.ST_Touches(
func.ST_GeomFromWKB(func.ST_AsEWKB(TZH.geom), 4326),
func.ST_GeomFromWKB(func.ST_AsEWKB(str(geometry)), 4326),
func.ST_GeomFromWKB(func.ST_AsEWKB(func.ST_GeomFromGeoJSON(str(geometry))), 4326),
)
== False
)
Expand Down

0 comments on commit f846b95

Please sign in to comment.