Add gitignore & pyqgis boilerplate
This commit is contained in:
parent
258860b024
commit
43b5c9d10f
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
# Folders
|
||||
data/
|
||||
ignored_data/
|
||||
|
||||
# Python Modules
|
||||
standalone_charm.py
|
25
standalone_vs.py
Normal file
25
standalone_vs.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user