Scottish Contours (at last)


Although Scotland’s Environment Protection Agency makes available its LIDAR data (at https://remotesensingdata.gov.scot/data#/list), it isn’t easy to download the data in bulk, so I’ve not been able to download the full dataset and use to generate contours. The data is available as 5 separate datasets that overlap considerably, downloadable only as small areas (5km x 5km) at a fixed resolution, often 50 cm. This gives over 1,000 files to manually download, each coming as files of up to 400 MB.

I’ve recently come up with a way to extract the individual download links so after a bit of donkeywork, the rest can be automated. The pipeline goes:

  • Download a manageable set of files from one of the datasets
  • Resample to a 10 m resolution (much smaller files)
  • Repeat for the rest of the dataset
  • Combine all these tiles into a single image
  • Repeat for all the datasets
  • Calculate the shape that describes all the non-blank data for each dataset
  • Merge the 5 datasets together in date order (so that the newest dataset takes priority), using the calculated shapes to allow edges of datasets to be smoothly blended with the underlying data
  • Use my usual contour generation process to generate 5m and 10m contours across the whole of the resulting dataset
  • Insert these into my LIDAR contour database

A first attempt didn’t quite get the merge process right, resulting in some undesirable artefacts – such as this conical pit on Arran:

…so the whole process was repeated once the problem had been identified and corrected:

The end-result is available now at https://oomap.dna-software.co.uk/ Coverage of Scotland is shown below.

The SEPA LIDAR data is available under the Open Government Licence and is Crown copyright Scottish Government, SEPA and Scottish Water (2012-2022). The above maps are copyright OpenStreetMap and contributors.


Leave a Reply

Your email address will not be published. Required fields are marked *