Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vulnerability_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def geometric_classification_alternative(self, in_fn, n_classes, mask, fmask):
arr = in_band.ReadAsArray()

self.progress_updated.emit(10)
max_value = in_band.GetMaximum()
max_value = np.max(arr)

# Rescaled empirical vulnerability map to a [1.0–2.0] range
arr_rescale = 1+arr*1/max_value
Expand Down Expand Up @@ -320,4 +320,4 @@ def replace_ref_system(self, in_fn, out_fn):

# Move the temp file to replace the original
shutil.move(temp_file_path, write_file_name + '.rdc')
self.progress_updated.emit(100)
self.progress_updated.emit(100)