Skip to content

Commit

Permalink
VBET add geom fix to threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead committed Sep 7, 2021
1 parent 723bc5e commit 594d9ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vbet/vbet/vbet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from rscommons.util import safe_makedirs, parse_metadata, pretty_duration
from rscommons import RSProject, RSLayer, ModelConfig, ProgressBar, Logger, dotenv, initGDALOGRErrors, TempRaster, VectorBase
from rscommons import GeopackageLayer
from rscommons.vector_ops import difference, copy_feature_class, remove_holes_feature_class
from rscommons.vector_ops import difference, copy_feature_class, remove_holes_feature_class, geom_validity_fix
from rscommons.thiessen.vor import NARVoronoi
from rscommons.thiessen.shapes import centerline_points
from rscommons.vbet_network import vbet_network, create_stream_size_zones, copy_vaa_attributes, join_attributes
Expand Down Expand Up @@ -361,6 +361,8 @@ def vbet(huc: int, scenario_code: str, inputs: Dict[str, str], vaa_table: Path,
for out_shape in out_shapes:
shape_intersected = False
out_geom = ogr.CreateGeometryFromJson(json.dumps(out_shape))
if not out_geom.IsValid():
out_geom = geom_validity_fix(out_geom)
out_feat = ogr.Feature(out_layer_defn)
out_feat.SetGeometry(out_geom)
for field, value in reach_attributes.items():
Expand Down

0 comments on commit 594d9ef

Please sign in to comment.