When I cut one raster with clip raster by mask layer I get the expected result.
But when applying batch processing with the same vector file, and the same rasters, the rasters aren't clipped and the values are changed to 0 and NaN?
The rasters are landsat 5 images, and the vector has the same datum.
Edit: I've figured out this is the gdal command used when processing individually:
gdalwarp -ot Float32 -q -of GTiff -cutline "some_shape.shp" -co COMPRESS=DEFLATE -co PREDICTOR=1 -co ZLEVEL=6 -wo OPTIMIZE_SIZE=TRUE "original_raster.tif" "clipped_raster.tif"
And this one is used in batch processing:
gdalwarp -ot Byte -q -of GTiff -cutline "some_shape.shp" -co COMPRESS=NONE -wo OPTIMIZE_SIZE=TRUE "original_raster.TIF" "clipped_raster.tif"
Why the differences?
Answer
The answer was in the gdal command, in the batch processing menu, click on Toggle advanced mode and change Output raster type to Float32. Still don't know why the predetermined option is Byte.
No comments:
Post a Comment