[GIS] Clipping a raster produces bigger raster in QGIS

clipqgisraster

I need to cut a raster layer (size 500 MB about) using a vector mask.

Going to Raster -> Extraction -> Clipper and using a vector mask in the same coordinate system of the raster, QGIS produces a .tiff raster bigger than the original raster (about 1.5 GB) and without the two and .prj file.

I cannot explain this: is there a way to have a clipped raster smaller than the original one and with the two and .prj associated files?

Best Answer

The clipped raster is an uncompressed GeoTIFF (no projection file needed), so you should edit the gdalwarp string manually in the Clipper window to set the compression method (and other useful options). For instance:

gdalwarp -q -cutline C:/Geodata/potenza.shp -crop_to_cutline -tr 10.0 10.0 C:/Geodata/Sentinel-2/RGB.tif C:/Geodata/Sentinel-2/RGB_clipped.tif -co "TILED=YES" -co "COMPRESS=DEFLATE" -co "INTERLEAVE=BAND" -co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256"