Introduction to PyQGIS
Conditions d’achèvement
5. Create a Stage Volume Curve using PyQGIS without QGIS GUI
For many purposes of automisation it would also be very useful to be able to use PyQGIS in scripts without starting the QGIS graphical user interface.
We're going to explore this and dive deeper in the code that was used before using a Jupyter Notebook.
- Open a new Miniforge prompt and activate the tutorials environment.
mamba activate tutorials
- We need to install the Pandas library for this tutorial. Run the following command:
mamba install pandas
- Go to the folder where you want to download the subdirectory with the tutorial.
- In the webbrowser go to https://github.com/jvdkwast/PyQGISTutorials
- Go to Code and copy the https url.
- Download the tutorial and data with git:
git clone https://github.com/jvdkwast/PyQGISTutorials.git
- Go to the subdirectory \PyQGISTutorials and run:
jupyter lab
- In the browser go to the subdirectory StageVolumeCurve and double click on PyQGISStageVolume.ipynb to follow the tutorial.