Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…_plugin into postprocessing
  • Loading branch information
Daniel committed Feb 9, 2024
2 parents 74ad0f3 + 9286ee6 commit 9def931
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions geovita_processing_plugin/test/test_alg_excavation.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def setUp(self):
self.building_layer_path = self.data_dir / 'bygninger.shp'
self.excavation_layer_path = self.data_dir / 'byggegrop.shp'
self.raster_rock_surface_path = self.data_dir / 'DTB-dummy-25833-clip.tif'
self.assertTrue(self.building_layer_path.is_file(), "Building shape source file does not exist.")
self.assertTrue(self.excavation_layer_path.is_file(), "Excavation shape surface source file does not exist.")
self.assertTrue(self.raster_rock_surface_path.is_file(), "Raster rock surface source file does not exist.")

# Assuming these layers exist for testing purposes
self.building_layer = QgsVectorLayer(str(self.building_layer_path), 'test_bygninger', 'ogr')
Expand Down
10 changes: 9 additions & 1 deletion geovita_processing_plugin/utilities/AddLayersTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ def __init__(self, description: str = "Add Layers", layers_info: dict = {}, grou
style_dir_path (Path): Path to styles directory
logger (Logger): Logger for logging messages.
"""
super().__init__(description, QgsTask.CanCancel)
super().__init__("Add Layers Task", QgsTask.CanCancel)
self.layers_info = []
self.group_name = ""
self.styles_dir_path = None
self.logger = None
self.prepared_layers = [] # Initialize prepared layers list
self.completed = False

def setParameters(self, layers_info, group_name, styles_dir_path, logger):
self.layers_info = layers_info
self.group_name = group_name
self.style_dir_path = style_dir_path
Expand Down

0 comments on commit 9def931

Please sign in to comment.