Python LiDAR tools
-
Open a Windows PowerShell
-
Navigate to the directory where you want to store the project:
cd PATH
-
Clone the github repository with:
git clone https://github.com/sitn/py-lidar-tools.git
-
Navigate into the project directory:
cd .\py-lidar-tools\
-
Create a new python virtual environment:
python -m venv venv
This creates a venv
folder inside the project directory.
-
Activate the virtual environnement:
.\venv\Scripts\activate
-
Install the dependencies:
pip install -r requirements.txt
-
Within the python venv, navigate to the
scripts
directory:cd .\scripts\
-
Open the
config.yaml
file and adjust the parameters as needed. -
Run the scripts according to the desired workflow (see below).
- Run
raster_tiling.py
to create a set of buffered raster tiles with overlap (to avoid edge effects) - Run
detect_tree_tops.py
to detect the tree tops from the buffered canopy height model tiles - Run
merge_vector_files.py
to merge the tiled tree_top files into a single file
Script | Description |
---|---|
raster_tiling.py |
Creates a raster tile set from a vector tile index and raster source directory |
detect_tree_tops.py |
Detects tree top locations in a raster canopy height model |