This repo generates DTM (Digital Terrain Model) from DSM (Digital Surface Model).
Note: We are unable to install Saga as part of the dependency, as it is not avilable on PyPI or conda.
To install saga_cmd - sudo apt update; sudo apt install saga
conda install -c conda-forge dsm2dtm
These step are for Linux. This will differ a bit for MacOS and windows.
# Step 1: Clone the repo
% git clone https://github.com/seedlit/dsm2dtm.git
# Step 2: Move in the folder
% cd dsm2dtm
# Step 3: Create a virtual environment
% python3 -m venv venv
# Step 4: Activate the environment
% source venv/bin/activate
# Step 5: Install requirements
% pip install -r requirements.txt
# Step 6: Install saga_cmd
% sudo apt update
% sudo apt install saga
Run the script dsm2dtm.py and pass the dsm path as argument.
python dsm2dtm.py --dsm data/sample_dsm.tif
DSM was derived from this point cloud data