QGIS Plugins
Two released QGIS plugins - Terrain Viewer 0.6.0, the app's sidebar as a QGIS panel whose modes are tile service layers (Colour and Values per mode), with an Install button for a local tile service and an experimental local compute of 16 modes in numpy - and Send2MapApp 0.5.1, the app's "Open in" list in QGIS.
Two QGIS plugins are released, both in qgis-plugin/, their zips on the repository's qgis-plugins-* releases (install):
- Terrain Viewer (0.6.0, MIT, QGIS 3.28 to 4.x): a dock panel laid out as the app's sidebar. Each checked mode is a layer of a tile service, with its settings in the layer's address; the panel's Install button downloads a local tile service for this platform (pinned, sha256 checked, off until enabled), and an experimental box at its top computes 16 modes in QGIS itself with numpy, no service at all (QGIS Live Compute).
- Send2MapApp (0.5.1, GPL v2 or later, QGIS 3.22 to 4.x): "Open in", the place shown or clicked in QGIS opened in another viewer at the same place and scale (below).
Both are checked headless in QGIS 4.2 and 3.44 LTR (qgis-plugin/test_*.py). Neither is on plugins.qgis.org yet. How they came about: design history.
Terrain Viewer: the panel
A dock panel laid out as the app's sidebar: the same groups (Elevation Hypso, Terrain Analysis, Relief Visualization, Hillshade, Lighting Effects, Overlays), each mode a row (its checkbox on the left, its forms on the right: Colour, Values, Vector) with its opacity and settings (ramp, range, radius, method) behind a gear button, a terrain source picker, the keys, and the address of a tile service.
- Each checked mode is a layer of the project: an XYZ layer whose address the panel writes (
/terrain-tiles/{z}/{x}/{y}.png?modes=<mode>&<its settings>), as/qgis.qgzdoes, in a "Terrain Viewer (live)" group with the app's panel groups, stacked as the map stacks them. A changed setting rewrites that layer's address and refreshes it; only the settings that differ from the app's defaults go into it. Opacity and blending stay QGIS layer settings (the tiles are asked opaque, the shading modes multiplied; see the QGIS section of the tile service page). - The overlays (contours, iso-line, mound candidates, plane slicer, graticule) are raster layers as the app draws them, and on demand also vector tile layers (
.pbf), styled by the plugin in the mode's colour. - The lists come from the service:
/sourcesfor the terrain sources,/colorrampsfor the ramps, and/processes?expand=true, each mode as an OGC API - Processes description: the panel's groups (x-tv-groups) and, for each mode, its form, whether it is shading, its opacity parameter (x-tv-properties) and its settings as inputs (the app's URL parameters, with type, allowed values and default, from the generated URL reference). A service older than 2026-11-24 has no/processesand is refused with a message to update it (0.2.2 dropped the fallback to the removed/modesand/tiles). So a new mode or parameter in the app reaches the plugin without a plugin release. - A mode computed as numbers has a Values box: its values before the ramp, in natural units, as a Float32 raster GDAL reads from the service's
/gdal.xml(see values, not colours), for QGIS's own analysis tools. - A mode's forms (0.6.0): checking the mode turns on its Colour layer (the first time; afterwards the forms it had); Colour and Values can each be checked alone or together, and checking one checks the mode; unchecking the mode or its last form removes the layers (0.5.0 only hid them, so a box and the map could disagree). A layer removed by hand in the layer tree, or by a new project, unchecks its form. The gear is shown while Colour (or Vector) is on. A changed setting rewrites the layer's address with
setDataSource, which keeps the renderer, opacity, blending and resampling set in the layer's properties. - "Open from link": paste a share link, get its layers.
/view?<the link's query>answers what the view switches on, the opacities, the parameters every layer keeps and the camera (the reading/qgis.qgzdoes). - Freeze copies the layers drawn now (the checked ones) into a new group under the live one, which stays on top, named with the date, the time and the place ("Frozen 2026-11-24 14:05 — 44.51, 4.00 z11"): XYZ, vector tile and values layers alike, every setting in their addresses, with their opacity, blending, style and order. The copies carry no mark the panel looks for, so later changes leave them as they are; several freezes stack as several groups, the newest on top, to compare settings side by side.
- A saved project reopens as it was: on Connect, the panel reads its layers' addresses back into its checkboxes and settings.
- Pure Python on QGIS's own API, no dependency. It needs a tile service: the Terrain Viewer desktop app's (
http://localhost:3400), one installed from the panel (a download, off until enabled), a local one (cd tile-server && pnpm start) or a hosted one; or, for 16 modes, none: the experimental local compute at the top of the panel. - QGIS is a flat, north-up client that picks the tiles it loads: the plugin never asks for 3D, tilted, rotated or split views, so the service it talks to needs no browser.
- When the service does not answer (at Connect, or later: the panel asks its
/healthevery 15 s in the background), the status line and QGIS's message bar say so. For an address on this machine (localhost,127.0.0.1) the warning suggests starting the desktop app with its tile service on (port of the address), or a local service, and checking Local tile service (installed from the panel); for a remote one, checking the address or the network.
Install
The zips are on the qgis-plugins-2026-11-25d release (Terrain Viewer 0.6.0, Send2MapApp 0.5.1), for QGIS 3.22 to 4.x (Terrain Viewer needs 3.28); 0.5.0 stays on qgis-plugins-2026-11-25c, 0.4.0 on qgis-plugins-2026-11-25b and 0.3.0 on qgis-plugins-2026-11-25. Since 0.5.0 Terrain Viewer is one plain zip for every platform; the tile service is downloaded from the panel when wanted:
| Asset | Size | What it is |
|---|---|---|
terrain_viewer-0.6.0.zip | 60 KB | The plugin, pure Python. Install it in QGIS |
terrain-viewer-tile-service-windows-x64.zip, -macos-arm64, -macos-x64, -linux-x64 | 48 to 59 MB each | The local tile service of one platform (Node 22, the service, its node_modules with that platform's sharp binaries). Not installed by hand: the plugin's Install button downloads the one it pins |
service_pins.json, SHA256SUMS | The bundles' names, sizes and sha256, as the plugin pins them | |
send2map_app-0.5.1.zip | 27 KB | Pure Python, no service |
In QGIS: Plugins > Manage and Install Plugins > Install from ZIP, pick the zip, Install Plugin. The Terrain Viewer button is on the Web toolbar (or Web > Terrain Viewer). Not yet on plugins.qgis.org (its metadata.txt needs an email first). A small pure-Python zip is also the form plugins.qgis.org is built around (one zip for every platform, reviewed as source); the 0.3 and 0.4 platform zips, 48 to 60 MB with a Node executable inside, were for the release only.
With the desktop app
The simplest local setup: run the Terrain Viewer desktop app, turn on Settings > Desktop: local tile service (port 3400 by default), then in QGIS open the Terrain Viewer panel with the address http://localhost:3400 (the default) and press Connect. The desktop app runs the same service the bundles carry, on this computer only, for as long as the app is open (and again at its next launch while the setting stays on). With another port, type http://localhost:<port> in the panel.
The local tile service, installed from the panel
Under the address field, the panel has a Local tile service row: a box, disabled until a service is installed, and a button.
- Install (48 MB) downloads the bundle of this platform (Windows x64, macOS arm64 or x64, Linux x64) from the GitHub release named in the plugin's
service_pins.json, checks its sha256 and size against the pin (a different file is refused and nothing is installed), and unpacks it into the plugin's data folder in the QGIS profile,<profile>/terrain_viewer/tile-service/<release>/<platform>/. The download goes through QGIS's network manager (its proxy and SSL settings), in a QGIS task with its progress in the status line; GitHub's redirect to its download host is followed. A plugin version pins one release of the service, so the plugin and the service it starts are always a tested pair; a new pin installs next to the old one, which is then deleted. Remove stops and deletes it. - Installed, the box is off by default, so the service never runs unless asked for. Checking it only enables it; Connect starts it. The panel opening (the toolbar button, a saved project) never starts it: with the box on, the status line says to press Connect. Unchecked, the panel connects to the address field, e.g. the desktop app's service.
- Connect starts it as a subprocess,
bin/node server.mjsin that folder, listening on this machine only (127.0.0.1), on port 3410 or, when that is taken, a free one; the address field shows it and the status line says where it runs and its process id. The first start takes about 3 s. A saved project's layers follow the port: on Connect their addresses are rewritten with the current one. - It stops when the plugin unloads (QGIS quitting, the plugin disabled, reinstalled or updated) or the box is unchecked; and, if QGIS goes without stopping it (a crash), by itself: it is started with
TV_EXIT_WITH_STDIN=1and stops when its standard input, a pipe from QGIS, closes. Its log isterrain-viewer-qgis-tile-service.login the system's temporary folder; the status line names it when the service does not start. - No Earthdata token in the plugin (0.6.0; 0.5.0 had a field): a NASA Earthdata token for G-LiHT's protected files lives in a tile service's environment only (
EARTHDATA_TOKEN). The service started from the panel inherits QGIS's environment, so anEARTHDATA_TOKENset for QGIS reaches it; the plugin never stores one (0.6.0 deletes the oldterrain_viewer/earthdataTokensetting), no token goes into a layer's address or ships in a bundle, and the service reads no.env(TV_ENV_FILEpoints at nothing). The service's Earthdata proxy is unchanged. - No browser engine: the service draws what QGIS asks for, flat north-up tiles, with the direct engine (Node and sharp). playwright-core is not in the bundle and the service runs with
TV_NO_BROWSER=1, so it never looks for Chrome or Edge; a 3D, tilted, rotated or split view, or a source only the app draws, answers 501 with a message. - If it stops while connected (a crash, the process killed), the background health check warns, and Connect starts it again.
- Zip extraction drops the executable bits on macOS and Linux: the plugin sets them on
bin/nodebefore starting it. The macOS Node is the one nodejs.org signs and notarizes; sharp's libraries come from its npm packages. - A tile service unpacked as
terrain_viewer/server/inside the plugin folder (a 0.4 platform zip, a developer's build withmake_zip.py --server-dir) is used first, and the button is hidden.
How QGIS plugins ship native programs
What the plugin downloads is a Node runtime (the official nodejs.org build, checked against its SHASUMS256.txt when the bundle is made), the tile service's JavaScript (tile-server/*.mjs and the app's code bundled into generated/), and its production node_modules, among them sharp's prebuilt native libraries (libvips) for that platform. It then runs it as a local HTTP service on 127.0.0.1, which QGIS reads as XYZ and GDAL layers like any web service. Other plugins that need native code have done it three ways:
- Download on demand. The classic WhiteboxTools for QGIS plugin does not include the WhiteboxTools binary: the user downloads it from whiteboxgeo.com or the project's GitHub releases and sets its path in Settings > Options > Processing > Providers > WhiteboxTools (its manual); the
whiteboxpackages for Python and R download it themselves on first use. Terrain Viewer's Install is the second form inside QGIS: one click, a pinned version and a checked hash instead of a manual download and a path to type. - Installed with QGIS, the plugin only pointing at it. GRASS ships with QGIS's Windows and macOS installers and OSGeo4W (a separate package on Linux), and its Processing provider is part of QGIS. SAGA has been a separate plugin since QGIS 3.30 (Processing Saga NextGen Provider): SAGA itself comes from OSGeo4W or SAGA's own downloads, and the plugin is told its folder. The Orfeo ToolBox provider likewise needs OTB installed apart and its folder set in the Processing options. None of these plugins carries the program.
- Bundled in the plugin. Rare, because the zip becomes one per platform and large, and a binary in a plugin cannot be reviewed as source. Terrain Viewer 0.3 and 0.4 did it (48 to 60 MB zips, one per platform); 0.5 moved to the download.
What is less common is the form: a local HTTP service rather than a command-line program called per run. It suits tiles, which QGIS already knows how to ask for, cache and cancel; a Processing provider over the same service (one algorithm per mode, writing a GeoTIFF) would be the WhiteboxTools-like form for batch work.
From the repository:
cd qgis-plugin
python make_zip.py # dist/terrain_viewer-0.6.0.zip and dist/send2map_app-0.5.1.zip
python make_zip.py --service-bundle windows-x64 # dist/terrain-viewer-tile-service-windows-x64.zip (any platform from any host; none named: all four)
python make_zip.py --pins <release-tag> dist # terrain_viewer/service_pins.json from the bundles in dist/ (before the plain zip)
python make_zip.py --server-dir windows-x64 <folder> # the service unzipped, as the desktop app ships it
python -I smoke_bundled.py dist/terrain-viewer-tile-service-windows-x64.zip # starts it as the plugin does, asks a tile, stops it (no QGIS)
# Through the panel, in headless QGIS, from a temporary plugins folder: Install (the bundle served from this machine and
# pinned, a tampered one refused), Connect, processes, a slope layer, a tile, the unresponsive warnings, Remove
QT_QPA_PLATFORM=offscreen python-qgis test_service_paths.py installed dist/terrain_viewer-0.6.0.zip dist/terrain-viewer-tile-service-windows-x64.zip
QT_QPA_PLATFORM=offscreen python-qgis test_service_paths.py installed dist/terrain_viewer-0.6.0.zip # the real download from the pinned release
QT_QPA_PLATFORM=offscreen python-qgis test_service_paths.py external dist/terrain_viewer-0.6.0.zip http://localhost:3400 [--stop "<command>"]--service-bundle needs the root install and tile-server's (tile-server/build.mjs bundles the app's code into generated/ first). It takes Node 22.22.3 from nodejs.org, checked against its SHASUMS256.txt, and installs tile-server's production dependencies flat (node-linker=hoisted: a zip keeps no symlinks) with pnpm's supportedArchitectures set to the platform, so the right @img/sharp-* binaries land; source maps, type declarations and playwright-core are left out. The QGIS plugins workflow (.github/workflows/qgis-plugins.yml, on demand) builds each platform's bundle on its own runner and starts it there with smoke_bundled.py; with release_tag it attaches the bundles, writes their hashes into service_pins.json, builds the plain zips with those pins inside and attaches them too, with service_pins.json and SHA256SUMS. The pins file is then committed back, so the repository's plugin pins the released bundles. A release: create it (gh release create qgis-plugins-<date> --prerelease --latest=false), run the workflow with its tag, commit the attached service_pins.json.
Send2MapApp: "Open in"
A second plugin in the same folder, qgis-plugin/send2map_app/: the place shown or clicked in QGIS opened in another viewer at the same place and scale, from a dropdown on the Web toolbar (the current view, in the destination picked, which is remembered), the button itself (a map tool: the point clicked), the map canvas's right-click menu ("Open in" at the point clicked) or Web > Send2MapApp. QGIS 3.22 to 4.x; install it from the qgis-plugins-2026-11-25c release as above.
-
A QGIS map tool: the button is checked while the tool is on, with a crosshair cursor carrying an "open elsewhere" badge, and unchecks itself when another map tool (Pan, Identify, ...) is picked, as QGIS's own tools do. The destination picked is kept in QGIS's settings (
plugins/send2map_app/destination). -
Icons: QGIS-style SVGs for the plugin, Terrain Viewer and the web viewers, QGIS's own 3D globe for Google Maps 3D and Bing Maps 3D, the publishers' logos for Google Earth, Esri, Maxar and Search-EO.
-
Destinations: every entry of the app's own "Open in" list (Iconem River-REM, Iconem Search-EO, ESRI Wayback, Google Maps 3D, Google Earth historical and 3D on the web, Bing Maps 3D, ShadeMap, LiDAR Lens, BBBike MapCompare), plus Terrain Viewer itself and its historical mode (historical-satellite.iconem.com), Maxar, and Google Earth Pro on the desktop through a KML file. LiDAR Lens is greyed out outside Britain and Ireland, as in the app.
-
The camera: the canvas centre or the point clicked, the zoom whose 512 px tiles have the canvas's ground resolution there (the app's zoom, so the other viewer opens at the same scale in any project CRS), the heading from the canvas rotation.
-
One list: the app's destinations are a Python port of
OPEN_IN_DESTINATIONS(components/TerrainControlPanel/open-in-links.tsx).python qgis-plugin/test_open_in.pyevaluates the TypeScript builders under Node and compares ids, labels, coverage and URLs for a set of cameras, so a destination added to the app fails the test until the plugin has it. -
Lineage and licence: it began as Send2GE (
send2google_earth) by Maxim Dubinin and NextGIS (source), a map tool that sends the point clicked to Google Earth through a KML file. Iconem's additions in 2025 (as Send2MapApp: web destinations in a toolbar dropdown) and 2026 (the app's whole list, the right-click menu, the current view, QGIS 4) keep its licence, the GNU GPL v2 or later, and its copyright lines; that is why it is a plugin of its own rather than part of the MITterrain_viewer.
Design history
Before the plugins, QGIS got the app's modes only through the tile service's /qgis.qgz: a project with every mode as an XYZ layer, configured as a view was. A layer's settings lived in its address, and QGIS has no control bound to an XYZ address's parameters, so changing a ramp or a radius meant editing the layer's source URL. A plugin was the way to have controls. The plan (2026-11-23) had two steps, the first cheap:
- A panel that writes tile service layers: written on 2026-11-23; Freeze came in 0.2.0, the "Terrain Viewer (live)" group in 0.2.1, and 0.2.2, the first release (2026-11-24), requires
/processes. 0.3.0 (2026-11-25) shipped the tile service inside four platform zips of 48 to 60 MB, 0.4.0 made it off by default and dropped the browser engine, and 0.5.0 (the same day) went back to one plain 50 KB zip with the service downloaded by the Install button. - The modes computed in QGIS, with no tile service: the experimental local compute (0.5.0, 16 modes since 0.6.0), below.
Step 2 as planned
The plan for step 2, kept for reference; what was built and measured is on QGIS Live Compute.
- Reading: GDAL reads the tiles and nothing else. A Terrarium or Terrain-RGB pyramid through GDAL's WMS/TMS driver (the XML of
gdalTileSourceinlib/terrain-tile-spec.ts), a COG or VRT directly, a raw WMS through GDAL's WMS driver. Decoding the RGB packing into metres is numpy (the formulas oflib/elevation-encoding.ts). The sources only the app's protocols read (LERC, quantized mesh, GEM-15's cells, a difference) need their own reader or stay on step 1. - Computing: numpy, not
gdaldem: the app's modes are its own (LRM, sky view factor, openness, matcap, Phong, the mound detector, the eigen-based ones), and the point is that QGIS shows what the app shows. Eachlib/*-protocol.tsis a kernel over an elevation grid with a margin, which ports to numpy array code: slope, aspect, curvature, TPI, TRI and roughness in a few lines each; sky view factor and openness as the app's ray sweeps (vectorised per direction); matcap and Phong as the shaders' formulas per pixel; the colour ramps fromlib/color-ramps.ts. - Delivery: a QGIS raster layer per mode, computed for the canvas extent at the canvas resolution and recomputed on pan and zoom (debounced, in a background task), or written to a GeoTIFF on request. Optionally a Processing provider, so each mode is also an algorithm for models and batch runs.
- Checking: the port is checked against the app tile by tile, as
tile-server/compare-engines.mjschecks the direct engine against the browser: same tiles, a table of differences. - Keeping in step: two implementations of each mode drift. The comparison above runs in CI on a fixed set of tiles, so a change to a protocol that the Python port does not follow fails a check.
Where it stands (0.6.0): reading through GDAL, the numpy kernels, delivery as Float32 values GDAL reads (so QGIS's own colour ramps apply) or as coloured tiles, and the tile-by-tile check are done for 16 modes, Phong and matcap included, plus contour lines as a vector layer per view (qgis-plugin/test_live.py, against the app's kernels in Node, the tile service and gdaldem). Not done: the comparison in CI, the Processing provider, and the modes that need a whole view (the mound detector, local dominance, the eigen-based ones); for those, the tile service layers stay the way in.
One Source Schema
Built-in terrain sources, library entries and your own sources are one record type, looked up by id in one place and resolved by one function.
QGIS Live Compute (experiment)
Terrain modes computed inside QGIS with numpy, no tile service - 16 modes (hillshade, multidirectional hillshade, slope, aspect, curvature, TPI, TRI, roughness, LRM, sky view factor, openness, shadows, Phong, matcap, contours as a mask and as lines, hypsometric tint) checked against the app's kernels, the tile service and gdaldem; Colour and Values per mode; how QGIS picks tile zooms and resamples; parallel tiles timed; numpy, numba, cupy and the tile service compared.