Skip to content

Commit

Permalink
fix r.extract.buildings
Browse files Browse the repository at this point in the history
  • Loading branch information
anikaweinmann committed Mar 25, 2024
1 parent 42b1f3e commit 6804fb7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ def main():
grass.run_command("r.mask", flags="r", quiet=True)
elif options["used_thresh"] == "ndvi_thresh":
ndvi_thresh = float(options["ndvi_thresh"])
else:
grass.fatal(_("The parameter <used_thresh> has to be <ndvi_thresh> or <ndvi_perc>!"))

# Creating tiles
tiles_list, number_tiles = create_grid(tile_size, "grid_cell", fnk_vect)
Expand Down Expand Up @@ -297,7 +299,7 @@ def main():
"memory": memory,
}

if options["ndvi_perc"]:
if options["used_thresh"] == "ndvi_perc":
param["fnk_raster"] = fnk_rast
else:
param["fnk_vector"] = fnk_vect
Expand Down

0 comments on commit 6804fb7

Please sign in to comment.