Execute QGIS algorithms outside of QGIS GUI
- python 3.6+
- QGIS 3.12+
Ubuntu 18.04
python3
sudo apt-get install python3
QGIS 3.12
- add the following to /etc/apt/sources.list
deb https://qgis.org/ubuntu bionic main
- add qgis.org repository public key to your apt keyring
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 51F523511C7028C3
- install QGIS - see QGIS official installation page
sudo apt-get update
sudo apt-get install qgis qgis-plugin-grass
- add to your .bashrc or .bash_profile
export PYTHON_PATH=/usr/share/qgis/python
# for GPU-less machines
export QT_QPA_PLATFORM='offscreen'
- add autoincremental field
- create grid
- join attributes by location
- polygon from layer extent
- simplify geometries
- split with lines
- Use argparse.ArgumentParser