How to Mosaic Satellite Images in QGIS: Merge Tiles Into One Seamless Raster
- Primary Signal: How to Mosaic Satellite Images in QGIS: Merge Tiles Into One Seamless Raster
- Overview: Satellite imagery and elevation data usually arrive as separate tiles. Mosaicking merges them into one seamless raster in QGIS, and the difference between a clean result and a mess...
- Verification: Analyzed and compiled by FreeSky GeoData editorial monitoring desk.
Almost every raster dataset worth using arrives in pieces. A Sentinel-2 scene is split into tiles, a national elevation model is delivered as dozens of squares, and a drone survey comes back as a folder of GeoTIFFs. Analysing them one tile at a time is slow and error-prone, so the first job in most raster projects is to merge them into a single seamless raster, a process called mosaicking.
The distinction matters. The Merge tool under Raster, Miscellaneous creates a single physical GeoTIFF that contains all the data, which is simple to share and works in any software, but it can be enormous and slow to build. The Build Virtual Raster tool creates a small .vrt file that simply points at the original tiles and pretends they are one layer, which is fast, takes almost no disk space, and is usually the better choice when you have many tiles.
Before you merge: match CRS, resolution and data type
Most failed merges trace back to one of three mismatches. First, the coordinate reference system: every tile must share the same CRS, or the output will be shifted, stretched or simply wrong. Check Layer Properties, Information for each tile, and if they differ, reproject them first with Raster, Projections, Warp. Second, the resolution: tiles with different cell sizes cannot be merged cleanly, so resample them to a common resolution before you start.
Nodata values deserve the same attention. A nodata value marks pixels that contain no real data, usually the black border around a tile. If your tiles use different nodata values, the merge will treat one tile's empty border as real data and paint stripes across your mosaic. Check the nodata setting in each layer's properties and set a consistent value, commonly zero for elevation data, before merging. Five minutes of checking here saves an hour of debugging later.
Method one: the Merge tool for a single physical file
Load all your tiles into QGIS, then go to Raster, Miscellaneous, Merge. In the dialog, select the layers you want to combine; hold Ctrl to pick several at once. If tiles overlap, the order matters: the last layer in the list wins where they overlap, so put the tile you trust most at the bottom of the list or at the top depending on the version's ordering.
Choose an output file, a GeoTIFF in a folder with plenty of free space, and click Run. For a handful of small tiles this takes seconds. For dozens of large tiles it can take minutes and produce a file several gigabytes in size, so consider building a virtual raster first to check the result, then merging to a physical file only if you need one.
Method two: Build Virtual Raster for speed
The virtual raster approach is the working professional's default. Go to Raster, Miscellaneous, Build Virtual Raster, add your tiles individually or select a whole directory, and save the output with a .vrt extension. QGIS creates a tiny text file that references the originals, and the mosaic appears in your map canvas as a single seamless layer, with no visible tile borders because QGIS stretches the display using the minimum and maximum of the whole merged dataset.
A virtual raster has real advantages: it costs almost no disk space, it builds in seconds, and if you later replace a tile with a corrected version, the mosaic updates automatically. It also has one limitation: it is only a reference, so if you move or rename the source tiles, the mosaic breaks. For sharing a finished product or sending data to a colleague, a physical GeoTIFF is still the safer choice.
Fixing the seams when things go wrong
If your mosaic shows visible lines along the old tile edges, the usual cause is a mismatch in stretch or nodata handling rather than a real data problem. Try setting the layer's symbology to stretch using the whole raster's statistics instead of the current canvas, and confirm the nodata value is set so the border pixels render transparent.
Also check for missing tiles. A hole in the middle of a mosaic almost always means a tile was not selected in the input list, which is easy to miss when you are selecting dozens of layers. The Processing Toolbox keeps a history of the exact command that was run, so you can review which files went in. Once the mosaic is clean, remove the individual tiles from the Layers panel to keep your project tidy, and save the project so the mosaic stays linked.
Frequently Asked Questions
Q: What is the difference between Merge and Build Virtual Raster in QGIS?
A: Merge creates a single physical GeoTIFF containing all the data. Build Virtual Raster creates a tiny .vrt file that references the original tiles and displays them as one layer, using almost no extra disk space.
Q: Why does my merged raster have visible seams?
A: Usually because the tiles have different CRS, resolutions or nodata values. Check that all inputs match before merging, and set a consistent nodata value so tile borders render transparent.
Q: Can I mosaic rasters with different resolutions?
A: Not cleanly. Resample them to a common resolution first, for example with the Warp tool, and then merge. Otherwise the output will have alignment errors and value jumps at the seams.
📖 Continue Reading the Full Story
Continue reading this article on FreeSky GeoData.
⚡ Access Full Content Now