7

I have an .ecw map of north Portugal that has been made by joining 132 little maps at scale 1:25000 (I got the map from here: https://www.elrincondelmapa.com/Mapas_Nacionales.php). I want to crop it to get the original 132 pieces (no need to get the exact ones) and then I would like to export them as .jpg files.

I'm an absolute beginner to QGIS and digitalized maps in general. I found several explanations for extracting one region of a map with the clipper tool, but I would like to automate the task, so I could avoid repeating the same action 132 times. It would be possible to draw a grill on the map, crop it to get the 132 parts and export the images as .jpg files?

I have QGIS version 3.16.3.

2
  • Is the data georeferenced? Feb 15 at 4:19
  • Geodetic reference system WGS84 and geographic projection (Lat/Lon).
    – fich
    Feb 15 at 4:27
6
+100

This method only requires two steps:

  1. Create a vector Grid
    vector>Research Tools>Create Grid
    (it might be good to add a little overlay on each grid)
  2. Clip Raster by Mask layer (using vector grid from step 1)
    raster>Extraction>clip raster by mask layer...
    select the green arrow to iterate over every feature in the vector grid, creating a separate clipped raster for each grid square.

Step 1: Create Grid Step 2: Clip Raster by mask Layer (iterate) Some outputs visualised over the grid:
Some of the outputs

2
  • This solution seems perfect but I have problems. The map is very large (over 1GB in .ecw) so I selected jpeg compression for the extraction, but I get "JPEGPreEncode:Strip/tile too large for JPEG" (if I do not select the compression, the program ask for more than 30 GB of space...). What can I do? If I directly export one region into a pdf at scale 1:25000 I get 10-20 MB for the piece. That is fair to me, but in this manner I cannot automate the task and correctly create the separted sheets, etc...
    – fich
    Feb 20 at 18:23
  • 1
    Yeah this might be a case of trail and error experimenting with some compression types to get the needed amount of compression. Here are some posts and answers that might be helpful: I find LZW compression type to have a big impact clip with compression Answer 1, clip with compression answer 2, compression guide
    – Cushen
    Feb 21 at 10:39
3

My suggestion is as follows:

  1. Use the Create grid tool to create a grid for map area.

  2. Use the Split vector layer tool to split the data obtained in the previous step into separate files (you will probably need manual editing in this step to correct the borders of the crop area and the map).

  3. Use the Clip tool in Batch Process mode to crop the map.

1
  • Thanks for the response, but I can't follow the instructions as I'm an absolute begginer. I could create the grid.
    – fich
    Feb 20 at 19:03

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.