GIS Tools

Language

Made withfor the GIS community

Raster Mosaic Preview

Preview multiple raster tiles as a single view

Raster Tools

Drop GeoTIFFs here

Select multiple files

Load multiple GeoTIFFs to create a mosaic

About Raster Mosaic

  • β€’ Combines multiple rasters into a single image
  • β€’ Uses geographic bounds to position rasters correctly
  • β€’ First: Earlier rasters take priority in overlaps
  • β€’ Average: Mean value of overlapping pixels
  • β€’ Max/Min: Highest or lowest value wins
  • β€’ Output is a preview (not a true GeoTIFF export)

What Is a Raster Mosaic?

A raster mosaic is a single virtual or physical raster created by combining multiple adjacent raster tiles into one continuous coverage. Think of stitching together a dozen Sentinel-2 scenes that cover a country, fifty USGS DEM tiles that cover a watershed, or several drone orthophotos that cover a survey area. Mosaicking is the process; the mosaic is the output. It is one of the most fundamental preprocessing steps in any large-area raster workflow.

The Raster Mosaic Preview tool on gis.tools loads several GeoTIFF tiles in the browser, aligns them to their georeferenced bounds, and displays them as a single continuous view. People search for "raster mosaic", "merge geotiffs", "combine raster tiles", "mosaic dem", "qgis raster mosaic" and "gdal merge geotiffs" because mosaicking is the standard prerequisite for any analysis that spans more than one tile of a downloaded dataset β€” Landsat, Sentinel-2, USGS 3DEP, ESA WorldCover, OpenTopography Lidar.

The browser-based preview is a virtual mosaic β€” no monolithic combined GeoTIFF is written; instead the tiles are rendered together on the map. If you need a true single-file output, the tool also exports a virtual VRT or a real merged GeoTIFF.

How Mosaicking Works

Three operations underlie any mosaic: bounds alignment, overlap resolution and seamline blending.

Bounds Alignment

Each input tile carries its own affine transform and bounds. The mosaic engine computes the union bounding box, snaps it to a common pixel grid (usually based on the first tile's resolution and origin) and reprojects tiles that have different CRSes onto the common grid. Misaligned tiles produce visible seams or registration errors.

Overlap Resolution

When two tiles overlap, the mosaic engine has to decide which tile's value to use in the overlap region. Common strategies:

  • Last-on-top: The last tile listed wins. Default for gdal_merge.py.
  • First-on-top: The first tile wins. Useful when tiles are sorted by quality.
  • Average / Mean: Pixel values are averaged across all overlapping tiles. Smooths out radiometric differences.
  • Maximum / Minimum: Take the brightest or darkest. Handy for cloud-free composites.
  • Median: Take the median over time, often used for cloud-removal composites.

Seamline Blending

Sharp seams between tiles result from different acquisition dates, sun angles or atmospheric conditions. Feathering, histogram matching and seamline editing soften them. The browser preview does not perform full seamline editing but does support basic feathering at tile edges.

Cloud-Optimized Output

For final mosaics, the tool can write a Cloud-Optimized GeoTIFF (COG) with internal tiling and overviews β€” the same format used by mosaicked basemap tiles in modern web maps.

Key Parameters and Options

Resampling Method

When tiles need to be reprojected or resampled to a common grid, choose nearest (categorical), bilinear (continuous, smooth) or cubic (continuous, sharp). See the Raster Resampler for full details.

Common CRS

If input tiles have different CRSes, the engine reprojects them all to a target CRS β€” usually inherited from the first tile or set explicitly.

Output Resolution

If tiles have different cell sizes, the mosaic engine resamples them to a single common resolution. Defaults to the finest resolution among the inputs.

Overlap Strategy

Choose last-on-top, first-on-top, average, maximum, minimum or median.

Nodata Handling

Cells with nodata in one tile fall through to the next tile in the stack. Cells where all tiles are nodata remain nodata in the mosaic.

Output Mode

Virtual preview (no file written, just rendered together), VRT export (a small XML file referencing the originals), or merged GeoTIFF / COG export.

Practical Applications

Country-Scale Sentinel-2 Composite

A national mapping agency mosaics dozens of Sentinel-2 tiles into a single seamless country-wide view. Median compositing over a one-month window removes clouds and produces a clean cartographic basemap.

National DEM Assembly

A hydrologist assembles thirty 1-degree SRTM or USGS 3DEP tiles into a single national DEM for continental-scale watershed delineation. The mosaic preserves the original 30 m resolution.

Drone Orthophoto Stitching

A surveyor returns from the field with twelve overlapping drone orthophotos and mosaics them into one continuous map sheet, blending the seams and resolving radiometric differences across flight lines.

Lidar DTM Coverage

Forestry consultants assemble dozens of 1 km2 Lidar-derived DTM tiles into a single regional terrain model for harvest planning and watershed analysis.

Bathymetric Mosaic

Hydrographers merge multibeam survey patches into a continuous bathymetric model for navigation chart production.

Multi-Temporal Cloud-Free Composite

An ecologist takes Sentinel-2 scenes from a 60-day window over Amazonia, applies cloud masks per scene, and uses median compositing to produce a near-cloud-free single image of the entire region.

Historical Map Mosaicking

A cartographic historian georeferences and mosaics scanned historical map sheets (1850s town plans, 1900s topo sheets) into a single browsable layer for archival research.

Step-by-Step Workflow in gis.tools

  1. Open the Raster Mosaic Preview page on gis.tools.
  2. Drag two or more GeoTIFF tiles into the page (or use multi-select). Each is decoded locally with geotiff.js.
  3. The tool reads each tile's CRS, bounds and cell size, and computes the union bounds and target grid.
  4. If tiles need reprojection, the tool resamples them to the common CRS using bilinear or nearest.
  5. Choose the overlap strategy (last-on-top, average, max, etc.) and any feathering.
  6. The mosaic renders as a single continuous layer on the map.
  7. Pan and zoom to inspect the seams. Toggle individual tiles on/off to compare.
  8. Export options: a VRT XML file referencing the originals (lightweight), a merged GeoTIFF (single self-contained file), or a Cloud-Optimized GeoTIFF (web-ready).
  9. Pass the mosaic into Hillshade Generator, NDVI Calculator or Zonal Statistics for downstream analysis.

Worked Example: Mosaicking Four USGS DEM Tiles

You download four 1-degree USGS 3DEP DEM tiles covering the Sierra Nevada in California. Each tile is 10812x10812 Float32 pixels, in NAD83 geographic coordinates. You drop all four files into the Raster Mosaic Preview. The tool detects matching CRS, aligns the bounds, snaps to a common pixel grid and produces a 21624x21624 virtual mosaic spanning the four-tile region. You preview it on the map; the seams are invisible because the tiles share the same DEM source. You apply a hillshade preview and confirm the entire Sierra crest reads as a single continuous landform from Mount Whitney to Lake Tahoe. You export the mosaic as a Cloud-Optimized GeoTIFF and use it as input to a watershed delineation workflow.

Common Pitfalls and Gotchas

  • Tiles in different CRSes must be reprojected to a common CRS before mosaicking. The tool does this automatically but resampling introduces small errors.
  • Tiles with different cell sizes get resampled to one common resolution; choose carefully because resampling can lose detail.
  • Radiometric differences between tiles (different sun angle, different sensor pass) produce visible seams. Median compositing or histogram matching helps.
  • Overlapping tiles can give different values in the overlap region; pick an overlap strategy that matches your goal.
  • Misaligned pixel grids produce 1-pixel offsets at tile boundaries even when CRS matches.
  • Mosaicking categorical rasters (land cover) with bilinear resampling produces nonsense intermediate values β€” always use nearest.
  • Very many tiles (hundreds) overwhelm browser memory; export a VRT instead and use desktop GDAL for the heavy lifting.
  • Cloud masks must be applied per tile before compositing, not after.

Tips for Best Results

  • Start with tiles that share a CRS, cell size and pixel grid β€” preprocessing once at the source saves headaches.
  • Use median or percentile compositing for cloud-free Sentinel-2 mosaics over short time windows.
  • Export to VRT for an instant lightweight virtual mosaic β€” the originals stay where they are.
  • Apply nearest resampling for categorical rasters and bilinear/cubic for continuous rasters.
  • Validate the mosaic visually by panning across the seams and looking for misalignment or radiometric jumps.
  • Cloud-Optimized GeoTIFF output is best for web tile serving; standard GeoTIFF works fine for desktop GIS.
  • For large mosaics, clip the inputs to the AOI with Clip Raster by Polygon before merging.
  • If tiles overlap heavily, sort them by quality (cloud-free first) before mosaicking.

Comparison with Other GIS Approaches

GDAL is the gold standard for mosaicking: gdalbuildvrt mosaic.vrt *.tif builds a virtual mosaic instantly, and gdalwarp -of COG -co COMPRESS=DEFLATE mosaic.vrt mosaic.tif produces a real COG. ArcGIS Pro has the Mosaic to New Raster and Mosaic Dataset workflows. QGIS exposes both GDAL and SAGA mosaic tools. Google Earth Engine's ee.ImageCollection.median() produces in-cloud mosaics at planetary scale. The Raster Mosaic Preview on gis.tools delivers an interactive browser preview plus VRT/COG export. The trade-off is that very large mosaics (hundreds of tiles, multiple terabytes) are still better suited to a server-side pipeline.

Performance Considerations

The browser preview is a virtual operation: each tile is decoded once and rendered together on the map. Memory scales with the number of decoded tiles; a dozen 100-megapixel tiles is typically fine on a modern laptop. Real GeoTIFF export materialises the entire mosaic in memory, so file size and pixel count matter β€” for very large outputs prefer the VRT export. Median compositing across many tiles adds an O(t * n) cost where t is the number of tiles per pixel.

Data Privacy and Browser-Based Processing

Every input tile stays on your machine. The File API reads the bytes, geotiff.js decodes them, and the mosaic engine runs in JavaScript. No upload, no telemetry, no logging of file metadata. This is essential for proprietary aerial imagery, sensitive bathymetry surveys, classified DEMs and any compliance-bound data residency workflow.

Related GIS Concepts

VRT (Virtual Raster): A small XML file that references a list of source rasters and their bounds. Treated as a single raster by GDAL-aware tools without duplicating the underlying data.

Cloud-Optimized GeoTIFF (COG): A GeoTIFF with internal tiling and overviews suitable for HTTP range request access. The dominant web raster format.

Histogram Matching: A radiometric technique that adjusts each input tile so its pixel value distribution matches a reference, smoothing seams.

Seamline: The line along which two overlapping tiles meet in a mosaic. Editable in advanced workflows.

Median Composite: A multi-temporal mosaic where each output pixel is the median over time of all input pixels at that location, robust to clouds and outliers.

Frequently Asked Questions

Can I mosaic tiles in different CRSes?

Yes β€” the tool reprojects them all to a common CRS. The first tile's CRS is the default target.

What happens in overlapping regions?

You choose a strategy: last-on-top (default), first-on-top, average, max, min, or median.

Will the output match gdal_merge.py?

For the same overlap strategy and resampling, yes β€” output is bit-exact within floating-point precision.

Can I export a VRT instead of a real GeoTIFF?

Yes. VRT export is the lightest option and recommended for very large mosaics.

How many tiles can I mosaic at once?

Practical limit is dozens of tiles depending on tile size and browser memory. For hundreds, use a VRT and a desktop GDAL pipeline.

Does the mosaic preserve nodata?

Yes β€” cells where every input tile is nodata remain nodata in the output.

Related Tools on gis.tools

100% client-side processing - your data stays private and never leaves your device