Hi,

So the target files dem.tif and hillshade.tif exist already? Maybe it is not so 
simple to update already compressed data in place. Have you tried what happens 
if you re-write the results into new files

gdal_translate -co tiled=yes -co compress=LZW hillshade.tif final_hillshade.tif.

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Andrey VI via 
gdal-dev
Lähetetty: tiistai 19. maaliskuuta 2024 14.43
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] gdal_rasterize processed GTiff filesize question

Hello.

I’m using gdal_rasterize to remove some data from DEM (Int16) and hillshade 
(Byte) rasters with shape-file, like this:
gdal_rasterize -burn -32768 shape.shp dem.tif and gdal_rasterize -burn 0 
shape.shp hillshade.tif
Both DEM and hillshade GTiffs created with -co COMPRESS=LZW -co TILED=YES 
options. After processing with gdal_rasterize the size of GTiffs becomes 1.5 
times larger. Why it happens? I assumed that it should be the other way around, 
because a significant portion of the data is replaced with the same values and 
should be compressed well.

Andrey
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to