Skip to content

Commit

Permalink
Fix in counting num samples
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierCLL committed Sep 5, 2024
1 parent a31eecb commit 4c02218
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gui/sampling_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def get_samples_distribution_table(map_layer, points, area_unit):
map_value = map_layer.get_pixel_value_from_pnt(point)
if map_value not in samples_in_pix_val:
samples_in_pix_val[map_value] = 0
else:
samples_in_pix_val[map_value] += 1
samples_in_pix_val[map_value] += 1

values_and_colors_table = get_values_and_colors_table(map_layer.qgs_layer, map_layer.band, map_layer.nodata)
pixel_area_base = map_layer.qgs_layer.rasterUnitsPerPixelX() * map_layer.qgs_layer.rasterUnitsPerPixelY()
Expand Down

0 comments on commit 4c02218

Please sign in to comment.