08 November 2015

Processing UK Environment Agency LIDAR Data Tutorial

Recently, the Environment Agency has released its LIDAR data to the public. This is not the first time that DEM (Digital Elevation Map) data has been released from free. Satellite based DEM data has been released by ASTER and SRTM (SRTM is less noisy), but those have a horizontal resolution of 30m, which is quite coarse. The EA data, which was collected using LIDAR, has a much higher horizontal resolution, but the downside is that there is gaps in the data. Several of my archaeology friends have asked me to do tutorial on how to display this data.

If you look at the website, zoom in and click on a map tile, you can see that you can download 6 different sets of data. There is DTM (Digital Terrain Map) and DSM (Digital Surface Map) data. The difference is that the DTM data has stuff like trees stripped, which makes it much more useful for archaeology than the DSM data. It also comes in 3 resolutions, 0.5m, 1m & 2m. The trade off is that there is less area convered for the higher resolutions. I would recommend starting with the 2m data and downloading 1m for the same area if you really need it.

When you download a file, you will get a zip file containing up to 100 ASCII grid files, each covering a 1km square. This is not a normal image, but a file containing the height data. which we must process using GIS software. This tutorial will cover processing that data using a popular open source GIS package called QGIS, which you can download for free as a standalone application or as part of the OSGeo4w package. Here are the steps to follow.

If you haven't already got a project in QGIS, create a new one, setting the map projection to OSGB36 (EPSG:7405).

Unzip the contents of each zip file, and place the contents of each one in a folder of their own, for example, if your zip file is called LIDAR-DTM-2M-TR14.zip, create a directory called LIDAR-DTM-2M-TR14 and copy the contents of the zip file in there.

You will notice there are a lot of files, and we don't really want to deal with them all individually, so we will merge them together into one giant ASCII grid, covering a 10x10km square. To do this in QGIS, go to the Raster > Miscellaneous > Merge... menu. Next to the Input Files, press the Select... button and select all of the asc files in a directory. You also need an Output File for the merged data, for which I use the name of the directory again, which must be followed by a file extension of .asc, for example LIDAR-DTM-2M-TR14/LIDAR-DTM-2M-TR14.asc, preceeded of course by the rest of the file path to that directory. Finally, tick No data value and set it to -9999. Press ok and it will start working, which may take a while. It should load into QGIS automatically, having asked you what projection to use (OSGB36 again), but sometimes the process crashed. Don't worry, because the creation of the file has completed, so back on the QGIS main screen, press the Add Raster button and load the newly created file. Having merged all the files, you can delete all the original small unmerged files if you want, since they are pretty big. By default, you get the data displayed as a grey scale image with white as high and dark as low, as shown below.



You will notice that if you have more than one of these next to eachother, the edges don't match, so we need to set them to have a matching palette. We will also use a multi colour palette to provide a bit more contrast. Pick an image, right click it in the project window and select Properties. Go to the Style tab and change the Render type to Singleband pseudocolor. Then use the + sign to add bands. I currently use 0m-Black, 20m-Green, 40m-Brown, 60m-Orange, 80m-yellow and 100m-white. You can of course make up your own palette to suit your tastes. It should look something like this.


You can then right click on your image in the project window and select Styles > Copy Style and then right click on the rest of the images to do Styles > Paste Style to avoid entering that palette information all over again. This should give you something like this.


This shows the height information very well, but if you want to see small changes that might be created by archaeology, then we need to add a hillshade to this. To do this, go to Raster > Analysis > DEM. In the Input file, select one of your merged files. For the output file, use the same filename, except add -HS just before the .asc. You will notice that the resulting file will completely obscure the height data below. To fix this, right click on your newly created hillshade image, go to Properties, go to the Transparency tab and move the slider until it is at 50%. You should now be left with something like this. If you zoom in with QGIS, you will see a lot of the smaller features. Happy hunting!