Introduction to PyQGIS
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 Anaconda prompt and activate the tutorials environment.
conda activate tutorials
- We need to install the Pandas library for this tutorial. Run the following command:
conda 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\StageVolumeCurve and run:
- In the browser click PyQGISStageVolume.ipynb and follow the tutorial.