Opened 6 years ago

Last modified 6 years ago

#545 closed task

DEM Scripts Rewrite/Restructure — at Initial Version

Reported by: dac Owned by: dac
Priority: immediate Milestone: The Glorious Future
Component: Processing: general Keywords:
Cc: Other processors:


There are currently a large number of scripts and libraries for DEM related tasks, most commonly used to:

  • Create DEMs for use in APL
  • Create DEMs from LiDAR data
  • Perform general tasks on DEMs (e.g., reprojection)

These scripts are a complicated mix of bash and Python which are very difficult to debug. Previous attempts to simplify them have only increased the complexity.

There are problems with the existing scripts which are proving difficult to fix given the current state of the code, the biggest one is that the DEMs produced are often much larger than needed.

A rewrite/restructure of the existing DEM scripts is therefore proposed with the following aims:

  • Use Python instead of bash where possible
  • Store common functions within a Python library
  • Make use of existing libraries both external (e.g., GDAL, Proj, GRASS Python bindings) and internal where possible.

Given these aims the following is proposed:

New DEM Scripts
Create DEM subset to navigation data for use in APL. Locations of existing DEMs (ASTER and NMB) will be hardcoded but will allow any DEM mosaic (real or virtual raster) to be provided.


--aster [bool]
--nmb [bool]
--demmosaic [File, if not ASTER or NMB]
--nav [Navigation file]
--projectpath [Path to project]


--outdem [File]
Create DEM from lidar data

lidar files(s)
--inproj [shouldn't be needed if projection is stored properly with lidar]
--outproj [default same as input]
--mosaic [mosaic if multiple input files are provided]


--outdem [File]
--screenshots [File(s) optional]
Create DEM from lidar data suitible for use with APL.

lidar file(s)
--aster [bool - patch with aster]
--nmb [bool - patch with nmb]
--demmosaic [File, patch with custom DEM]
--inproj [shouldn't be needed if projection is stored properly with lidar]


--outdem [File]
--screenshots [File(s) optional]

New DEM Library
Putting all the DEM functions in a separate module (arsfdem) is proposed rather than multiple libraries.

      def las2dsm
      def las2intensity
      def asci2dsm
      def asci2intensity
      def get_bb
      def reproject
      def patch_dems
      def mosaic_dems
      def bng_to_wgs84
      def wgs84_to_bng
      def get_bb_from_hyperspectral
      def get_nmb_tiles
      def get_aster_tiles

Change History (0)

Note: See TracTickets for help on using tickets.