Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Added st_makevalid to catchment calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
EPajares committed Jul 6, 2024
1 parent 0979105 commit 515c9c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crud/crud_catchment_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ async def save_result(self, obj_in, shapes, network, grid_index, grid):
for i in shapes.index:
geom = shapes["geometry"][i]
minute = shapes["minute"][i]
insert_string += f"SELECT ST_SetSRID(ST_GeomFromText('{geom}'), 4326) AS geom, {minute} AS minute UNION ALL "
insert_string += f"SELECT ST_MakeValid(ST_SetSRID(ST_GeomFromText('{geom}'), 4326)) AS geom, {minute} AS minute UNION ALL "
insert_string, _, _ = insert_string.rpartition(" UNION ALL ")

sql_insert_into_table = f"""
Expand Down

0 comments on commit 515c9c2

Please sign in to comment.