nodata logic change

pull/907/head
Piero Toffanin 2020-09-03 15:47:05 -04:00
rodzic 97997a1f4d
commit 095bc0ce1f
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -168,8 +168,10 @@ class Metadata(TaskNestedView):
if has_alpha_band(src):
band_count -= 1
nodata = None
# Workaround for https://github.com/OpenDroneMap/WebODM/issues/894
nodata = 0
if tile_type == 'orthophoto':
nodata = 0
info = main.metadata(src, pmin=pmin, pmax=pmax, histogram_bins=255, histogram_range=hrange, expr=expr, nodata=nodata)
except IndexError as e:
@ -345,7 +347,7 @@ class Tiles(TaskNestedView):
indexes = non_alpha_indexes(src)
# Workaround for https://github.com/OpenDroneMap/WebODM/issues/894
if nodata is None:
if nodata is None and tile_type =='orthophoto':
nodata = 0
resampling="nearest"