Installation#
Stable version (recommended)#
This plugin is published on the official QGIS plugins repository: https://plugins.qgis.org/plugins/hedge_tools/.
LiDAR module#
All tools that use LiDAR, except Generate tree cover, require additional dependencies. If these dependencies are not available, the algorithms will be disabled and will not appear in the QGIS Processing Toolbox.
Dependencies installation#
Windows
It is recommended to install the dependencies using the OSGeo4W installer. When selecting the packages, make sure to choose:
python3-scipy.
pdal: PDAL – Point Data Abstraction Library (Executable).
python3-pdal: Point cloud data processing
Make sure you also have:
grass: GRASS GIS
gdal: The GDAL/OGR library and commandline tools
After restarting QGIS, LiDAR algorithms should be displayed. Otherwise, a warning will appear in the QGIS interface indicating which dependency is missing.
Linux
To install the dependencies, it is recommended to use Anaconda to install QGIS and HedgeTools LiDAR dependencies.
If Anaconda is not available on your system, you can follow their installation procedure.
Once Anaconda is installed, it is recommended to create a new environment to avoid conflicts with other libraries:
In your terminal:
conda create --name custom_name
You can then activate the environment:
conda activate custom_name
Next, install the dependencies and QGIS LTR in your environment:
conda install -c conda-forge/label/qgis_ltr -c conda-forge qgis scipy pdal
If you want to install a specific version of QGIS:
conda install -c conda-forge qgis=3.40 scipy pdal
Finally, you can launch QGIS. Your profile, plugins, and default settings should still be available:
qgis
After starting QGIS, the LiDAR algorithm should be displayed. Otherwise, a warning will appear in the QGIS interface indicating which dependency is missing.
Remark
For future use, remember to activate your custom environment before launching QGIS.
Remark
If you need additional dependencies to run other plugins, you can install them using:
conda install [-c channel] [package…]
HedgeTools in python#
The plugin provides a Python API, making the algorithms accessible directly from your IDE.
Prerequisites#
QGIS >= 3.40 along with it’s python bindings
Virtual environment creation#
An environment with qgis bindings is needed. To create it easily i recommend using the qgis-venv-creator project by GipsoCoding.
In your terminal you can do the following :
qgis-venv-creator installation
Install using pipx: pipx install qgis-venv-creator
Or in an existing environment pip install qgis-venv-creator
Create your pyQgis environment
create-qgis-venv –venv-name “qgis_bindings.venv”
If multiple QGIS installation are detected the prompt will ask you to choose one.
Activate your venv
qgis_bindings.venv/Scripts/activate
You should be able to use qgis python bindings. And if you activate this environment in your IDE you should have autocompletion available.
You can then use HedgeTools inside your IDE. The documentation is available in the Python API section