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.

  1. Open a new Anaconda prompt and activate the tutorials environment.
    conda activate tutorials
  2. We need to install the Pandas library for this tutorial. Run the following command:
    conda install pandas
  3. Go to the folder where you want to download the subdirectory with the tutorial.
  4. In the webbrowser go to https://github.com/jvdkwast/PyQGISTutorials
  5. Go to Code and copy the https url.
  6. Download the tutorial and data with git:
    git clone https://github.com/jvdkwast/PyQGISTutorials.git
  7. Go to the subdirectory \PyQGISTutorials\StageVolumeCurve and run:
    jupyter notebook
  8. In the browser click PyQGISStageVolume.ipynb and follow the tutorial.