2

I have a raster layer that I have clipped using a polygon in qgis. The extent of the raster layer did not change. How do I update the extent of my raster layer so that it is the minimum bounding box of my clipping?

  • Welcome to gis.stackexchange! If you can go back to the clipping process (Clipper), there is an option Crop the extent of the target dataset to the extent of the cutline which appears when you choose Mask layer clipping mode. – Kazuhito May 17 '17 at 4:33
2

To change the extent of raster,

(1) SAGA tools from Processing Toolboxcan fit the raster extent to the clipped image.

Step 1: Reclassify the area outside of the image from zero to nodata

First, activate Processing Tools | SAGA | Raster Tools | Reclassify values

Options can be set as:

  • Grid: your raster file
  • Method: single (default)
  • old value: 0.000000 (default)
  • new value: -99999
  • Check replace no data values checkbox
  • new value for no data values: -99999
  • Uncheck replace other values

and [Run]

Step 2: Crop to data

Then next tool is Processing Tools | SAGA | Raster Tools | Crop to data

  • Input layer: Reclassified layer

and [Run]


However, if you can go back to the clipping process (Clipper), you would get an optimized extent, and the above steps are unnecessary.

(2) Clipper

  • Choose Mask layer clipping mode
  • Assign a polygon as Mask
  • Select an option Crop the extent of the target dataset to the extent of the cutline

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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