id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,processors 545,DEM Scripts Rewrite/Restructure,dac,dac,"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_apl_dem.py'' 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. Inputs: --aster [bool] --nmb [bool] --demmosaic [File, if not ASTER or NMB] --nav [Navigation file] --projectpath [Path to project] Outputs: --outdem [File] ''create_dem_from_lidar.py'' Create DEM from lidar data Inputs: 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] Outputs: --outdem [File] --screenshots [File(s) optional] ''create_apl_dem_from_lidar.py'' Create DEM from lidar data suitible for use with APL. Inputs: 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] Outputs --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. {{{ arsfdem |--lidar def las2dsm def las2intensity def asci2dsm def asci2intensity def get_bb |--utilities def reproject def patch_dems def mosaic_dems |--projection def bng_to_wgs84 def wgs84_to_bng |--navigation def get_bb_from_hyperspectral |--tiled_dem def get_nmb_tiles def get_aster_tiles }}} ",task,new,immediate,The Glorious Future,Processing: general,,,mark1,