1

I am trying to clip an aerial map in QGIS 2.18 with the layers simultaneously in this map:

enter image description here

My purpose is to get the aerial map clipped by the red layer that includes all layers like this image (i did that image with draw software):

enter image description here

whereas the result of the clipper is without the blue circle layer:

enter image description here

The clip function in: vector-> processing tool-> clip, clips only vectors.

In Raster-> clipper, it clips only raster by the mask layer.

In ArcGIS 10.3 this function is called "clip to shape" and the whole map- rasters and vectors been clipped by polygon shape.

enter image description here

Is there an equal function to "clip to shape" in QGIS 2.18 the same as in ArcGIS?

  • Never heard of clip to shape tool in Arcgis. Makes me wonder what sort of output it might produce – FelixIP Jul 18 '17 at 7:21
  • The tool Raster -> Clipper as you point out can do the job. The mask layer can be a vector layer, in your case your red layer, so the result will be your aerial map clipped by the red layer – Francisco Puga Jul 18 '17 at 7:31
  • i update the question. – newGIS Jul 18 '17 at 10:51
1

This is how exactly Raster --> Extraction --> Clipper... works. You can also use Clip raster by mask layer from processing toolbox. Both running gdalwarp command.

As mask layer you have to choose vector layer, the raster will by clipped to vector layer extent rectangle, but all values outside of shape will be nodata if you leave the no data value option unchecked, it will remain 0 (intiger).

enter image description here

If you want to crop the extent to the shape check Crop the extent of the target dataset to the extent of the cutline option.

update:

I thing there isn't build-in tool for clip raster and vector layer at once. But it can be easily created with graphical modeler or python custom processing tool. Create model with Clip raster by mask layer for raster and Clip vectors by polygon for vector. The model should looks like:

enter image description here

Once you have working model saved, you can run it as a batch process for as many different raster and vector inputs you want.

For creating models and batch processing see QGIS documentation:

The graphical modeler

The batch processing interface

  • i update the question – newGIS Jul 18 '17 at 10:52
  • @newGIS ok, now I see it, I'll update my answer – Oto Kaláb Jul 18 '17 at 11:01

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.