Cutting an orthophoto into pieces with QGIS

In this tutorial, we are using QGIS version 3.24.3-Tisler. We will first create polygons into a new layer and then use those areas to clip the raster.

  1. Create a New GeoPackage Layer. Use the same parameters as in this example.
Give a descriptive name for the file.
Make sure you are creating a polygon feature layer. You can use your own coordinate system.

2. To edit polygon features onto the map, click on the pen and green area. Draw the first area onto the map.

Once you have clicked on all wanted edges points, right-click your mouse. You can click Enter when “Autogenerate” window pops up.

3. Turn on Snap, so that the areas touch each other. This way the end result will not have holes in them.

5. Once you are done, save edits and toggle editing off (pen)

Next we will cut the raster into smaller pieces

6. In the next step we will use the “Clip raster by Mask Layer” tool.

  1. Select one area (see screenshot above)
  2. Open tool: Raster > Extraction > Clip Raster by Mask Layer
  3. Insert raster,mask polygon layer and the following values.
    1. Mask Layer: select “Selected features only”.
    2. Assign a specified nodata value to output bands: For black: 0. For white 255
    3. Select “Create an output alpha band”,
    4. Select “Match the extent of the clipped raster to the extent of the mask layer
    5. Select “Keep resolution of input raster
    6. Advanced Parameters: Profile: High compression
    7. Clipped (mask) (output file): save as filename_clipped_part1.tif
  4. Run (do NOT close the window when done!)
  5. Rerun again with all areas:
    1. Select the next polygon area on the map
    2. Select “Change parameters”, and change the output name to “….part2”.
    3. Run again as many times as needed.