I have a large TIFF file (14 GB), and along with it, I have a shapefile, covering parts of the TIFF in different shapes

I want to basically just split the TIFF into smaller squares, while also generating a new shapefile if there is a/any shape(s) for that square, so in the end I want to have x-number of TIFF images and x-number of shapefiles with n-number of shapes inside the shape. If it's possible to also skip all the TIFFs without any shape, that would be great.

Is this possible?

  • 1
    Clip raster by mask layer
    – BERA
    May 17 at 10:29
  • No, that would give me a tif image for every shape, and that won't help me. I want to have a sqaure be, say 10km and if that square happens to cover 4 shape files, i want one tif and a shape-file with the info for those four shape files May 17 at 10:38
  • Or am i perhaps mistaken here? May 17 at 10:45
  • 1
    A lot of things are possible in QGIS. You need to break down your workflow into single steps which correspond to a tool in QGIS, and as BERA already teasered, clip raster by mask layer is one of those steps. Another would be merging the corresponding shapefiles.
    – Erik
    May 17 at 10:58
  • 2
    Welcome to GIS SE. As a new user, please take the Tour. "Is it possible?" Questions aren't all that useful, since pretty much everything is possible with GIS. We use a Focused question/Best answer model, so Questions with "and" in the title are likely to violate the One question per Question policy emphasized by the Tour. So yes, it is certainly possible; all you need to do is start working the task. You'll need to decide if, having established a tile scheme, you want the image chunks to be fixed size, or grow to the limits of the shapes that overlap that tile. Then you can start scripting.
    – Vince
    May 17 at 11:18

1 Answer 1


This is my first project with geo data and for some reason I thought if I split the tif I must do the shape at the same time, so there should be a command to do just that.

My solution:

  • Created a grid with the squares of my wanted size
  • Split the tif according to the grid and looping through the grid doing one output for each
  • Do the same for the shape with the Intersection feature

Then in my later steps I can just map them all together with the index in the name.

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