0

If I clip PROBAV (https://zenodo.org/records/3939050/files/PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif?download=1) worldwide raster with Deflate compression setting and Save resolution setting the result is bigger than 6 gb. Although the source is 1.8 gb.

What other parameter(s) would make it smaller?

UPD: I used parameters mentioned in the answer and I got 756 Mb raster for Eurasia. Solution found.

4
  • Compression would do that
    – Ian Turton
    Commented Nov 20 at 19:40
  • I used Deflate compression (Predictor 2, ZLevel 9) Commented Nov 20 at 20:18
  • 3
    Check the data type of the clipped raster, in layer properties. The PROBAV uses 8-bit unsigned integer values. Probably the clipped layer uses 32-bit integers or floats, which will balloon the file size
    – Andre Geo
    Commented Nov 20 at 21:52
  • 2
    Please edit your question to include the output of gdalinfo clipped_raster and also specify exactly how you clipped it.
    – user2856
    Commented Nov 21 at 0:39

1 Answer 1

5

I could not reproduce your issue. I made a test by clipping to the full extent of the source image. I adjusted couple of the parameters (predictor and zlevel) for making the conversion perhaps a bit faster. It took still over 15 minutes to run. I used tiled output because the source is tiled as well, and bigtiff I set just to be sure that the limit of TIFF will not be hit. This is the GDAL command that QGIS generated.

gdal_translate -projwin -180.0 80.0 180.0 -60.0 -of GTiff -co COMPRESS=DEFLATE -co PREDICTOR=1 -co ZLEVEL=7 -co tiled=yes -co bigtiff=yes PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif clipped.tif

The size of "clipped.tif" is 1651388008 bytes, that is less than the original 1713345228 bytes.

1
  • Tiles are useful indeed. Thank you. Commented Nov 21 at 8:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.