1

I have a set of georeferenced rasters that I want to combine in a seamless layer in QGIS. I believe what I have to do is clip them by mask layer and then build a virtual raster. There is an issue however. The original maps that I have scanned have zero overlap, so each one starts exactly where the other one ends. What do you think would be the best course of action here:

  • include the neatlines in the clipping mask - then my eventual map will have black lines along the seams
  • exclude the neatlines - then there will be gaps up to 10 pixels wide - is there any good way to fill them?
  • any other suggestions? maybe I am approaching it from entirely wrong angle?

By the way, is there by any chance a tool to trace the neatlines automatically instead of painstakingly drawing the clipping polygons manually?

2
  • Are you able to provide a graphic of what you are trying to achieve? Might help determine an answer for you.
    – CHenderson
    Jan 8 '20 at 7:23
  • You could fill the gaps of your "without neatlines" option with image inpainting.
    – til_b
    Sep 18 '20 at 9:21
0

You should try two simple gdal tools: gdaltindex and gdalbuildvrt.

To create the mosaic, since your rasters are georreferenced, you just need:

gdalbuildvrt mosaic.vrt *.tif

QGIS will open this mosaic.vrt raster.

If you want to create the grid around your rasters, you can use gdaltindex.

gdaltindex mosaic.shp *.tif

Open both the mosaic.vrt and mosaic.shp in QGIS.

If the rasters are large, you may also need gdaladdo to create overviews of the raster. It will became much faster in QGIS.

gdaladdo -ro mosaic.vrt
1
  • Thanks, this is valuable input, especially the overviews creation bit (because the rasters are, indeed, quite large). However my question was about slightly different issue. I am not sure where I should clip my rasters which were scanned from paper maps (before or after the neatlines) and if I could somehow automate the clipping process. Aug 6 '19 at 6:00

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.