Clip a raster with a vector

Clipping a raster to the bounds of a vector layer is fairly simple in the EnMAP-Box, since vector layers can be interpreted as masks.

  • Go to the Processing Algorithms and select Masking ‣ Apply Mask to Raster

  • Under Raster select the raster layer you want to clip, and under Mask select the vector layer.

    Tip

    If you want to invert the clip, which means that only pixels are included which are NOT within a polygon, simply activate the Invert Mask option.

../../_images/cb_cliprasterwvector.png

Fig. 7 Output example: Input raster (left), vector geometry for clipping (middle) and resulting output (right)

Attention

This method will just mask the raster according to the vector geometries, the extent will not be altered, which means the raster will not be cropped to the extent of the vector layer. You may use the Translate raster layer algorithm for this.