Skip to content

Commit

Permalink
Update fwdet_21.py
Browse files Browse the repository at this point in the history
wrong operator
  • Loading branch information
roescob committed May 30, 2024
1 parent 94bdeab commit 4a5938a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qgis_port/processing_scripts/fwdet_21.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def run_algo(self, dem_rlay_raw, inun_vlay, numIterations, slopeTH, grow_distanc
)['OUTPUT']

#mask negatives and inundation
water_depth = self._gdal_calc({'FORMULA':'A * (A > 0) * (B == 1)',
water_depth = self._gdal_calc({'FORMULA':'A * (A >= 0) * (B == 1)',
'INPUT_A':diff_rlay, 'BAND_A':1,
#'INPUT_B':dem_rlay, 'BAND_B':1,
'INPUT_B':inun_rlay, 'BAND_B':1,
Expand Down Expand Up @@ -557,7 +557,7 @@ def CalculateBoundary(self, dem_rlay, inun_vlay, numIterations, slopeTH,
'zscale' : 1 })['slope']

#apply filter
boundary2 = self._gdal_calc({'FORMULA':f'B*(A > {slopeTH})',
boundary2 = self._gdal_calc({'FORMULA':f'B*(A <= {slopeTH})',
'INPUT_A':slope_fp, 'BAND_A':1,
'INPUT_B':boundary1, 'BAND_B':1,
'NO_DATA':0.0,'OUTPUT':'TEMPORARY_OUTPUT', 'RTYPE':5})
Expand Down

0 comments on commit 4a5938a

Please sign in to comment.