diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d6bb3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Folders +data/ +ignored_data/ + +# Python Modules +standalone_charm.py diff --git a/standalone_vs.py b/standalone_vs.py new file mode 100644 index 0000000..cb08a75 --- /dev/null +++ b/standalone_vs.py @@ -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() \ No newline at end of file