Skip to content

Commit

Permalink
fix divide by square on multipolygon geojson
Browse files Browse the repository at this point in the history
  • Loading branch information
sujanadh committed Jan 22, 2024
1 parent c74855e commit e97ef2c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,12 @@ def remove_z_dimension(coord):

# Merge multiple geometries into single polygon
if multi_polygons:
boundary = multi_polygons[0]
geometry = multi_polygons[0]
for geom in multi_polygons[1:]:
boundary = boundary.union(geom)

geometry = geometry.union(geom)
for feature in features:
feature["geometry"] = geometry
boundary["features"] = features
return await run_in_threadpool(
lambda: split_by_square(
boundary,
Expand Down

0 comments on commit e97ef2c

Please sign in to comment.