I'm new in QGIS and I have a question. I am sampling an onion crop from a geottif:

enter image description here

I need to export each single rectangle/polygon into a single tiff file. Is there a plug-in for doing so?

  • 1
    Do you mean you want to clip the image in your question based on every single polygon in the polygon layer? – ahmadhanb Jan 8 at 4:56

The quickest way without opening the python console would be to do the following:

  1. run 'split vector layer' which creates a separate file for each of your vector features. Make sure to select an output directory. Then open all the vector files in qgis.

  2. now run 'clip raster by mask layer' and click on 'Run as Batch Process...' button in the bottom left hand corner.

  3. click on 'autofill..' in the Mask layer column and then press 'select from open layers...'. You can then select all the vector layers you want to use to cut the raster layer with.

  4. now click on 'autofill..' in the Input layer column and press 'select from open layers' and select the raster file you want to cut.

  5. now click on 'autofill...' in the Input layer column and press 'fill down'

  6. Lastly, using the bar at the bottom of the window scroll right until you see the Clipped (mask) column then press the first '...' button and select the folder where you want to save the rasters. Call the file output_ or what ever you want then press save.

  7. a autofill settings window will pop up select 'Fill with numbers' from the Autofill mode and press ok.

  8. make sure to turn on 'Load layers on completion' in the bottom left hand corner and press Run.

Hope that helps.

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.