The Airborne Survey and Research Facility Data Analysis Node (ARSF-DAN) based at Plymouth Marine Laboratory (PML) process airborne hyperspectral and lidar data acquired by the ARSF. As part of the LiDAR pre-processing a Digital Surface Model (DSM) is produced from discrete lidar returns, patched with a lower resolution DSM (normally ASTER) suitable for use in APL for hyperspectral data processing. The scripts used to produce these DSM use GRASS. Updated versions, which use the GRASS Python bindings, have recently been made available on GitHub under a GPLv3 license:
https://github.com/pmlrsg/arsf_dem_scripts
Installation
There are two main pre-requisites for the ARSF DEM Scripts: GRASS and the open source LAStools (namely las2txt), both are available under Windows, Linux and OS X. Once these are installed, download the scripts from GitHub (direct link) and install using:
python setup.py install
As the scripts use the GRASS Python bindings they need to be run using the same version of Python used by GRASS, this will likely be Python 2.7. If you have Python 3 installed as your default Python you should be able to specify they use Python 2.7 by installing using:
python2 setup.py install
For more detailed installation instructions see here.
Create a DSM Mosaic
To create a mosaic of all LAS files the following command is used:
create_dem_from_lidar.py --in_projection UTM33N \ --outdem EUFAR11_02-2011-187_dsm.dem \ las1.2
This will:
- Set up a GRASS database.
- For each line, convert the LAS file to a temporary text file using las2txt, keeping only the first returns and dropping points flagged as noise (class 7).
- Import the text file into GRASS using r.in.xyz.
- Patch all LAS files together using r.patch.
- Export the mosaic using r.out.gdal.
- Remove the GRASS database (unless –keepgrassdb is specified) and any other temp files created.
The library supports horizontal and vertical transforms by setting the ‘–out_projection’ flag. For transforms from British National Grid some additional files are required to ensure and accurate transform.
- The OSTN02 transform file, which can be downloaded from Ordnance Survey for horizontal transforms.
- A vertical difference file between the WGS-84 ellipsoid and the Ordnance Survey datum – ARSF can provide a copy of this ready for use in the DEM scripts.
The location of these needs to be set in the arsf_dem.cfg file. This is installed with the library but can be overridden by placing a copy in the current working directory (using the current name) or the home folder (stored with the name ‘.arsf_dem’ or ‘.arsf_dem.cfg’ so it is hidden).
DSM / DTM Utility Scripts
In addition to the scripts used as part of the standard ARSF processing, based on GRASS, there are two utility scripts to create a DSM and Digital Terrain Model (DTM). These two scripts (las_to_dsm and las_to_dtm) provide a common interface to a number of open source (e.g., SPDLib, FUSION) and paid packages (e.g., LAStools). If SPDLib is installed a DTM/DSM can be created using:
las_to_dsm -o LDR-EUFAR11_02-2011-187-01_spdlib_dsm.tif \ --hillshade LDR-EUFAR11_02-2011-187-01_spdlib_dsm_hillshade.tif \ --projection UTM33N \ --method SPDLib \ LDR-EUFAR11_02-2011-187-01.LAS las_to_dtm -o LDR-EUFAR11_02-2011-187-01_spdlib_dtm.tif \ --hillshade LDR-EUFAR11_02-2011-187-01_spdlib_dtm_hillshade.tif \ --projection UTM33N \ --method SPDLib \ LDR-EUFAR11_02-2011-187-01.LAS
Note, these utility scripts create a DSM/DTM using the default settings. For more control over output accessing the programs directly is advised. See previous post for an example of creating a DSM/DTM using SPDLib.
For more details on the use of the ARSF DEM scripts, including creating patched DSM for use in APL see the tutorial.
Archived LiDAR data from ARSF flights is available to download from NEODC. Registered users can apply for access to the ARSF archive here.