How can overlapping raster map sheets be overlaid in QGIS, and manually blended together in GIMP?

I have an overlapping set of hand-drawn raster maps that contain varying levels of detail and would would like to combine these into a single large map using QGIS and GIMP. Since the information in the overlap regions is sometimes complementary, I would like to be able to choose manually which pixels to take from which map sheet.

I was successful at georeferencing them onto OpenStreetMaps, and would now like to blend the overlaps together (which I cannot seem to work out how to do in QGIS). In GIMP, using one layer for each map of a given two map sheets, I can delete the bits in the top layer which I want to use from the lower one, make these regions transparent using a layer mask, and then merge down.

How do I transfer my aligned map sheets as individual layers into GIMP for editing and then back to QGIS?

I am new to QGIS and have played around with this for a while now but can't quite figure it out. Maybe I'm overlooking something or I am on the wrong track altogether.


When joining overlapping georeferenced rasters in QGIS, Raster->Miscellaneous->Merge` tool or GDAL_Warp (though possibly not via the plugin interface unless you invoke the plugin's edit button and you need to create an empty output file first - read the documentation on how to use GDAL-Warp for mosaicing) are the usual ways to mosaic multiple overlapping rasters. You could also get fancy with gdal_calc.py or raster calculator to have more manual control over the process.

However, if the merger is more about aesthetics than numeric values, this might be hard to define in the above tools, so I'm sympathetic to you wanting to do it in GIMP (even if it is not strictly the 'approved GIS way'). So, here's how: You can open your geotiffs in GIMP but anything you save there will lose its georeferencing so you will need to create a world file in QGIS (Raster->Projections->Extract Projection) for the layer that is going to be in the top left hand corner of the final image. Now, layer up and edit in GIMP as you describe. Titivate/merge-down/flatten etc and export to a new tif file. Assuming you haven't changed the resolution or rotated the final image, you can now make a copy of your world file and rename it to match your mosaic with the TFW extension. You should now be able to import this back into QGIS. QGIS will ask you to state what CRS to use - but the image should appear in the correct location due to the world file (so long as the UL corner of you output is identical to the UL corner of your top left image).

I offer no guarantees on the data validity of mosaicing your rasters in this way!!

  • I find PNG is sometimes a good option, especially if it's just for cartographic "special effects", using gdal_translate... the separate world file makes things easier as GIMP just sees a normal png. TIFFs can be problematic for older GIMP versions (2.8 is ok) due to the mere presence of Geotiff tags. – Steven Kay Nov 10 '16 at 20:18
  • Other formats are indeed available (obviously changing the world file extension accordingly) :). Although not a problem with PNG or TIF, if you use JPEG beware the issue of the progressive format save-option (see here) – MappaGnosis Nov 11 '16 at 9:30
  • Extracting the projection certainly helps to reload rasters edited with GIMP into QGIS! I am still struggling to get my georeferenced rasters into GIMP. I would like to import the overlapping rasters into GIMP as layers, in a way in which the scaling and placement is preserved (I have used linear transformation only when georeferencing onto OSM). So far, I was able to use the 'pixel size' to scale layers, and the 'layer extent' (from the meta-data in QGIS), to calculate where to place the layers in GIMP by calculating a new origin. This is tedious with many overlaps, is there a quicker way? – mapClimber Nov 15 '16 at 8:35

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.