More

Splitting raster in QGIS? without cliper

Splitting raster in QGIS? without cliper


I have polygon grid layer and raster image whitch want to split with my grid layer to have 9 new raster layers.

I was doing it like this guy but my QGIS stop working and shut down every time when I hit run button.

So is there another way, how to split raster with vector layer?


There's a QGIS plugin called GridSplitter which will take a raster (or vector layer for that matter) and split it up into one raster layer per grid cell. If you already have a grid polygon layer you can use that to cut up the image, using the 'cut layer' option (see screenshot)

This is probably the easiest way to do this, especially if you need to scale this up (e.g. split a world DEM into degree squares)


There is yet another way (of course):

Right-click your raster in Layers. SelectExport->Save As…and click the littleCreate VRTcheckbox to the right of Format option drop-down. This then opens a previously hidden VRT Tiles options section in th dialog (below 'Resolution'). You can set the columns and rows (tile size e.g. 512x512). The file name is the folder where all the tiles wil be stored.

The nice thing about this approach is you automatically get a VRT xml file too, ready to go.


You can use the approach that I have used with these raster and grid vector layer of next image. First, select the element to clip with "Select features by area or single click" at the grid vector layer. At the attributes table of grid layer, click in "Show selected features" option (at the bottom) and next, at the record, click with right button of the mouse for selecting "Open Form". Copy to your favorite text editor the extent parameters in this order: X_MIN, Y_MAX, X_MAX, Y_MIN (see next image).

Open Clipper Tool in Raster -> Extraction -> Clipper. Select the name of output file, and drag with the mouse one arbitrary area on the map and click on the icon pencil for editing gdal_translate command. Change projwin parameters for the values at your text editor (copy/paste).

After OK, the clipped image it will have the same resolution of raster base; as it can be observed at next image.


Watch the video: How to cut a Raster File on QGIS - Example on a NDVI Layer