Python Fusion – Running FUSION/LDV Programs from Python

fusionpython

I have been working with FUSION/LDV: Software for LIDAR Data Analysis and Visualization for LAS data processing.

Particularly I am using such commands as GridSurfaceCreate – to create a gridded surface model; CanopyModel – to create a canopy surface model using a LIDAR point cloud and especially I am interested in CanopyMaxima module which uses canopy model to identify individual trees. All commands can be found in FUSION manual here!

Currently I am running the programme manually from command line, however as all other work that I am doing is in Python, I was wondering if there is a chance to call FUSION/LDV functions from Python or more specific, is it possible to implement the FUSION programs in Python code?

The most important step would be to use CanopyMaxima for tree detection as this algorith indicated the best result for my test area.

Best Answer

Found the way with import os:

import os

output = r'W:\...\test'
chm_dtm = r'W:\...\test\chm.dtm'

TheCommand = 'W:\\FUSION\\CanopyMaxima.exe' + ' /threshold:6 /wse:2.2,0.16,0,0,0 /shape /summary ' + chm_dtm + ' ' + output

os.system(TheCommand)

The result:
test_HighPoints.shp
test_Polygons.shp
test_treelist.csv
test_treelist_summary.csv
Related Question