diff --git a/app/api/tiler.py b/app/api/tiler.py index a5cf33fd..58cbb8f9 100644 --- a/app/api/tiler.py +++ b/app/api/tiler.py @@ -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"