Add gitignore & pyqgis boilerplate

This commit is contained in:
Alireza Adli 2023-12-14 13:26:42 -05:00
parent 258860b024
commit 43b5c9d10f
2 changed files with 31 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
# Folders
data/
ignored_data/
# Python Modules
standalone_charm.py

25
standalone_vs.py Normal file
View File

@ -0,0 +1,25 @@
"""
Alireza Adli
Working with PyQGIS Standalone.
The preliminar codes and comments comes from the PyQGIS cookbook
"""
from qgis.core import *
# Supply the path to the qgis install location
QgsApplication.setPrefixPath(prefixPath='C:/Program Files/QGIS 3.34.1/apps/qgis', useDefaultPaths=True)
# Create a reference to the QgsApplication.
# Setting the second argument to True enables the GUI. We need
# this since this is a custom application.
qgs = QgsApplication([], False)
# load providers
qgs.initQgis()
# Write your code here to load some layers, use processing
# algorithms, etc.
# Finally, exitQgis() is called to remove the
# provider and layer registries from memory
qgs.exitQgis()