A BASH script which uses GDAL to process the Environment Agency's LIDAR data and create map tiles of surface features which can be viewed in a browser or used in JOSM.
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.
- Download one or more ZIP files of LIDAR Composite DSM data and their DTM equivalents from the Environment Agency e.g.
LIDAR-DSM-1M-TR15ne.zip
andLIDAR-DTM-1M-TR15ne.zip
. Place these ZIP files in the same directory aslidar2tiles.sh
. - 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.
- If you wish, alter the colour map by editing
colourmap.txt
. See thegdaldem
documentation for details. N.B.colourmap.txt
uses alpha values in addition to RGB values.
cd
to the directory containinglidar2tiles.sh
and run it (./lidar2tiles.sh
).
- The map tiles are placed in the
tiles
directory. Within this directory,leaflet.html
can 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.
file:///home/user/Desktop/lidar2tiles/tiles/{zoom}/{x}/{-y}.png
(note the-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