Terrain Viewer
Features

Auto source detection

Paste any URL in Add Terrain or Add Basemap and the dialog finds its type - tile templates, WMS, ArcGIS, COG, VRT, PMTiles, TileJSON, STAC, Allmaps and IIIF - from the URL itself, then from the response headers and first bytes

A new source opens on Auto: one URL field. Paste a link and the dialog recognises what it is, switches to the matching type with the URL in its field, and says what it found above the field ("Detected: WMS GetCapabilities"). Back to Auto returns to the single field. A name is proposed from the layer or the file. A search panel or a local file picked last is reopened next time instead of Auto.

From the URL itself

The URL's own shape answers most of the time, at once, without a request:

You pasteIt becomes
A template with {z}/{x}/{y} (also {-y}, {quadkey}, {s})TMS/XYZ (basemap); Terrarium or TerrainRGB (terrain, guessed from the URL, said so in the note)
{bbox-epsg-3857}, or a WMS REQUEST=GetMapWMS (basemap) or WMS raw elevation (terrain), the bbox turned into the placeholder
A WMS REQUEST=GetCapabilities, or SERVICE=WMS aloneWMS (list layers), its layers listed at once
A WMTS service or WMTSCapabilities.xmlWMS, with a note to give the tile template instead
An ArcGIS MapServerIts cached tiles, /tile/{z}/{y}/{x}
An ArcGIS ImageServerAn exportImage request: a picture for a basemap, Float32 for terrain
A .tif or .tiff, with or without a query behind it (a SAS token, a signature)Remote COG
A .vrtVRT mosaic (terrain)
A .lerc tile or an ImageServer/tile/ pathArcGIS LERC (terrain)
A .pmtiles archiveIts pmtiles:// tile template
tilejson or tiles.json in the pathTileJSON
A STAC API, catalog.json or collection.json, or /stac in the pathSTAC search, opened on that catalog
An Allmaps annotation (annotations.allmaps.org/maps/<id>)IIIF map (basemap)
An Allmaps viewer link (viewer.allmaps.org/?url=…&map=…)The map's annotation, taken from the link's map parameter
A IIIF manifest, info.json, /iiif/ or /manifests/ pathIIIF map, looked up in Allmaps: it drapes only if someone georeferenced it there
A NextGIS QMS pageQMS search (basemap)

From the response

When the URL says nothing (no extension, no placeholder, a signed download link, a service behind a short path), the dialog reads the response once typing pauses, in this order, and stops at the first match. Nothing big is downloaded: a HEAD, then one Range request for the first 64 KB.

  1. HEAD, the headers: Content-Type: image/tiff or a GeoTIFF type, or a Content-Disposition file name ending in .tif, .vrt (terrain) or .pmtiles.
  2. GET of the first 64 KB, the headers again (for servers that refuse HEAD).
  3. TIFF magic number in the first bytes (II*, MM*, BigTIFF II+ / MM+): COG.
  4. PMTiles header: a pmtiles:// tile template.
  5. WMS capabilities XML (WMS_Capabilities, WMT_MS_Capabilities): WMS (list layers).
  6. WMTS capabilities XML: WMS, with the note to give the tile template.
  7. VRTDataset (terrain): VRT mosaic.
  8. JSON with stac_version: STAC search on that catalog.
  9. JSON with tilejson or a tiles array: TileJSON.
  10. JSON that is an AnnotationPage or Annotation, or whose motivation is georeferencing: IIIF map (basemap).
  11. JSON with a IIIF @context (a manifest, an image's info.json): IIIF map through Allmaps (basemap).
  12. JSON with mosaicjson: COG through titiler.

This works when the server allows the browser to read it (CORS). When it does not, or nothing matches, the field says so and you pick the type by hand: the URL is kept.

Links to pages about the data are turned into the data's URL first: an Allmaps viewer link, a Source Cooperative repository page (source.coop/<account>/<repo> becomes data.source.coop/…/catalog.json), a stac-map link (?href=), a STAC Browser link (#/external/…).

What a dialog cannot take

Add Terrain refuses what is a picture rather than elevation: an Allmaps annotation or a IIIF map. The note says why and offers Open Add Basemap with it, which closes the terrain dialog and opens the basemap one on that URL, already detected.

After detection

The type's own field takes over: a WMS GetCapabilities lists its layers at once, a STAC URL opens the STAC search as a custom catalog, a COG shows its inferred zoom range and the external viewers. Everything else about the source (bounds, zoom range, linked sources, opacity) is set as for any source of that type: see Bring Your Own Data.

On this page