Skip to content

Commit

Permalink
Minor change that might get around GH Actions problem
Browse files Browse the repository at this point in the history
  • Loading branch information
kueda committed Oct 18, 2023
1 parent 811e324 commit 2e7bb3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def process_source(source_identifier, clean=False):
util.log("Repairing invalid geometries...")
util.run_sql(f"""
UPDATE {work_source_table_name}
SET geom = ST_CollectionExtract(ST_MakeValid(geom))
SET geom = ST_CollectionExtract(ST_MakeValid(geom), 3)
WHERE NOT ST_IsValid(geom)
""")
util.log("Removing polygon overlaps...")
Expand All @@ -163,9 +163,10 @@ def process_source(source_identifier, clean=False):
f"DELETE FROM {work_source_table_name} "
"WHERE ST_GeometryType(geom) = 'ST_GeometryCollection'"
)
util.log("Repairing invalid geometries after removing overlaps...")
util.run_sql(f"""
UPDATE {work_source_table_name}
SET geom = ST_CollectionExtract(ST_MakeValid(geom))
SET geom = ST_CollectionExtract(ST_MakeValid(geom), 3)
WHERE NOT ST_IsValid(geom)
""")
load_citation_for_source(source_identifier)
Expand Down

0 comments on commit 2e7bb3a

Please sign in to comment.