Skip to content

Commit

Permalink
fix: apply merge polygon function only if multipolygon
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujanadh committed Oct 16, 2024
1 parent 5511c7c commit 5bdbea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ async def preview_split_by_square(
Use a lambda function to remove the "z" dimension from each
coordinate in the feature's geometry.
"""
boundary = merge_polygons(boundary)
if len(boundary["features"]) == 0:
boundary = merge_polygons(boundary)

return await run_in_threadpool(
lambda: split_by_square(
Expand Down

0 comments on commit 5bdbea1

Please sign in to comment.