Open sendreams opened 6 hours ago
gdalwarp processes files one by one, so if they overlap significantly, it may end up updating the same output tile several times, which in case of a compressed dataset, leads to space being lost in the file
You should probably use: gdalbuildvrt -r cubic tmp.vrt input1.tif input2.tif
followed by gdal_translate tmp.vrt out.tif -co TILED=YES -co COMPRESS=LZW
@rouault thank you so much, you save my life.
as the workflow of gdalbuildvrt + gdal_translate is not totally equilvalent as the one of gdalwarp, if you need to use gdalwarp, one alternative is just to add a post-processing stage with gdal_translate output_of_gdalwarp.tif final_result.tif -co TILED=YES -co COMPRESS=LZW
that will generate a compact raster with the same content as the one output by gdalwarp
Feature description
i have two dem tif files which should be blend to a new tif file,
the files information is: file1 (no compress)
file2 (COMPRESSION=LZW)
blend two files, use "COMPRESS=LZW" parameter
the output tif info: ( COMPRESSION=LZW)
all files size:
then i try to using ArcGIS Pro to blend the same tif files
the result tif info : ( COMPRESSION=LZW)
these two files information almost identical, but the arcgis output file size is much smaller.
what's the reason about it?
Additional context
gdal version is : 3.9.1