QGIS python command in Databricks notebook
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 12:06 AM
Hello,
I would like to run a qgis python script in a databricks notebook. Currently, databricks doesn't recognize the qgis package.
For example, i'd like to run this small example :
from qgis.core import *
# Supply path to qgis install location
QgsApplication.setPrefixPath("/path/to/qgis/installation", True)
# Create a reference to the QgsApplication. Setting the
# second argument to False disables the GUI.
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()