Skip to content

Commit

Permalink
Hawaii non-zero exit codes
Browse files Browse the repository at this point in the history
* Four HUC8's in Hawaii with non-zero exit codes
* "Clipping Model Streams" to HUC produced unsupported fiona geoms
* Now forcing "LINESTRING" geom in ogr2ogr call
* Also over-riding inherited layer name to match output filename
* Changes inundation.py to use list object in mask call
Github Issue #8
  • Loading branch information
fernando-aristizabal committed Sep 21, 2020
1 parent 740cb33 commit 891993b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/run_by_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ echo -e $startDiv"Clipping Model Streams to HUC $hucNumber"$stopDiv
date -u
Tstart
[ ! -f $outputHucDataDir/demDerived_reaches_split_clipped.gpkg ] && \
ogr2ogr -progress -f GPKG -clipsrc $outputHucDataDir/wbd.gpkg $outputHucDataDir/demDerived_reaches_split_clipped.gpkg $outputHucDataDir/demDerived_reaches_split.gpkg
ogr2ogr -progress -nlt "LINESTRING" -nln "demDerived_reaches_split_clipped" -f GPKG -clipsrc $outputHucDataDir/wbd.gpkg $outputHucDataDir/demDerived_reaches_split_clipped.gpkg $outputHucDataDir/demDerived_reaches_split.gpkg
Tcount

## PROCESS CATCHMENTS AND MODEL STREAMS STEP 1 ##
Expand Down
4 changes: 2 additions & 2 deletions tests/inundation.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ def __return_huc_in_hucSet(hucCode,hucSet):

try:
#window = geometry_window(rem,shape(huc['geometry']))
rem_array,window_transform = mask(rem,shape(huc['geometry']),crop=True,indexes=1)
catchments_array,_ = mask(catchments,shape(huc['geometry']),crop=True,indexes=1)
rem_array,window_transform = mask(rem,[shape(huc['geometry'])],crop=True,indexes=1)
catchments_array,_ = mask(catchments,[shape(huc['geometry'])],crop=True,indexes=1)
except ValueError: # shape doesn't overlap raster
continue # skip to next HUC

Expand Down

0 comments on commit 891993b

Please sign in to comment.