Map tiles are coloured based on the height of surface features such as buildings and trees, calculated by subtracting the DTM from the DSM. By default, features below 1m in height are transparent, becoming red and opaque at 2m. There is a gradient through orange to yellow at 20m, then a more gradual gradient to white at 60m.
Downloading LIDAR data
- Download one or more ZIP files of LIDAR Composite DSM data and their DTM equivalents from the Environment Agency e.g.
LIDAR-DTM-1M-TR15ne.zip. Place these ZIP files in the same directory as
- If multiple resolutions of the same area are provided, the script will combine them, favouring higher-resolution data.
- You may find the coverage index helpful in determining which resolutions to download.
Altering the colour map (optional)
- If you wish, alter the colour map by editing
colourmap.txt. See the
gdaldemdocumentation for details. N.B.
colourmap.txtuses alpha values in addition to RGB values.
Running the script
cdto the directory containing
lidar2tiles.shand run it (
Using the output files
- The map tiles are placed in the
tilesdirectory. Within this directory,
leaflet.htmlcan be used to browse the tiles.
- The TIFF and VRT files created are not required but can be loaded into QGIS if you wish to examine the data to determine building heights, for example.
- To use the tiles in JOSM, click on Imagery > Imagery Preferences, click on the '+ TMS' button and enter the URL e.g.
-y) and a name for the layer. The layer will appear in the Imagery menu.
Copyright © gregrs-uk 2017, published under the GNU GPL v3.0