The output can be deployed on any static web host or CDN*
*In some instances it will be advantageous to use a single mbtiles file (sqlite db) instead of a directory of tiles.
Tools are Open Source
Imagery Pipeline
1 Raw TIFF.tif
Available from OSIP
2 Mosaic.vrt
Intermediate File
3 Cloud Optimized GeoTIFF.tif
Used in Desktop GIS
4 Raster Tiles.mbtiles
Used in Web Maps
5 Tile Server
Virtual rasters
Supported in ArcMap, ArcGIS Pro and QGIS.
[.vrt] is a file format created by the Geospatial Data Abstraction Library (GDAL). It allows a virtual dataset to be derived from other datasets that GDAL can read.
A regular GeoTIFF file, aimed at being hosted on a HTTP file server, with an internal organization that enables more efficient workflows on the cloud.
Raster Tile Basics
Web Maps are usually in Web Mercator EPSG:3857
Each zoom level is a directory, each column is a subdirectory, and each tile is an image.
MBTiles
An sqlite database consisting of a metadata table and a tiles table stored in TMS format.
zoom_level
tile_column
tile_row
tile_data
zoom level
x coord
y coord
image as blob
15
8858
20330
blob
Carta do Mundo de Mercator (1569)
The 'Mercator' Projection
Firstly, to spread on a plane the surface of the sphere in such a way that the positions of places shall correspond on all sides with each other, both in so far as true direction and distance are concerned and as correct longitudes and latitudes...
On Cartography
...the limitations of ancient geography be not unknown and that the honour which is due to past centuries be given to them.
Take a tile at zoom level 20, resize it, slice it up and serve it back to the client!
OverZoom Example
Viewing MBTiles on Android
Input/Mergin
MapTiler
SWMaps
QField
BREAK
Let's Get Coding
For those wanting to follow along.
Have QGIS ^3.x installed and working
Have gdal installed and working
Open OSGeo4W Shell
Type gdalinfo --version
Return ~ GDAL 3.3.1, released 2021/06/28
Obtain a copy of the sample rasters
The Process
1 2 3 4 5 6 7 8 9
Explore raster metadata with gdalinfo. Verify the accuracy of the data in QGIS with NGS ground control points. Create a Mosaic with gdalbuildvrt (force NAD83 2011 SP South). Create the COG with gdal_translate. Examine the output in QGIS. Create another VRT in WebMercator. Generate Raster Tiles with gdal2tiles, gdal_translate, and QGIS. Serve the raster tiles with wmts-server. View the mbtiles file on mobile with SW Maps.
gdal-info
gdalinfo --version
> GDAL 3.3.1, released 2021/06/28
gdalinfo OSIP\BS921630.tif
> Lots of Metadata
Accuracy Validation
NGS Marker in Person
Create the Mosaic
Create the mosaic in the native projection, adding in our own alpha band.
Servers are complicated to setup, response times are slow, and transformation support is unknown.
Convert to WebMercator
The default GDAL/Proj transformation from the NAD 1983 datum to WGS 1984 datum is null, and the only other option does not exactly match the default option in our commercial software.
It’s the classic problem of spurious precision...The problem we’re trying to solve is topological accuracy, not absolute accuracy. ~ Utah Geospatial Resource Center
Proj4 String
Replacement for the default NAD83 datum transformation definition in GDAL.
DIY Raster Tiles with QGIS & GDAL Using open source tools to generate orthomosaics and web map tiles from aerial imagery. Malcolm Meyer Ohio GIS Conference 2021