Remove initialize qgis from the constructor

This commit is contained in:
Alireza Adli 2024-04-25 11:16:33 -04:00
parent ef1da9a918
commit f49f2f9357

View File

@ -18,13 +18,10 @@ class ScrubLayer:
def __init__(self, qgis_path, layer_path, layer_name): def __init__(self, qgis_path, layer_path, layer_name):
self.qgis_path = qgis_path self.qgis_path = qgis_path
# Set the path to QGIS installation # Set the path to QGIS installation
QgsApplication.setPrefixPath(self.qgis_path, True) QgsApplication.setPrefixPath(self.qgis_path, True)
# # Initialize QGIS application
# qgs = QgsApplication([], False)
# qgs.initQgis()
self.layer_path = layer_path self.layer_path = layer_path
self.layer_name = layer_name self.layer_name = layer_name
self.layer = self.load_layer() self.layer = self.load_layer()