Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Default Index Score Workflow Implementation
Tickets #318 and #319
Summary of Changes
This update introduces a concrete implementation of the
DefaultIndexScoreWorkflow
, a class responsible for executing the "Use Default Index Score" workflow in QGIS. The workflow allows for the creation of raster masks for features within a bounding box layer, combining those rasters into a VRT (Virtual Raster Tile), and adding the VRT to the QGIS map.Key Features:
Workflow Execution:
self.bboxes_layer
) features.create_raster
method.create_raster_vrt
method.Cancellation Handling:
self.feedback.isCanceled()
before starting long-running tasks (e.g., raster creation and VRT generation) to ensure it can stop if necessary.Dynamic Layer Naming:
_
) in theID
attribute with spaces for readability.Methods:
execute
: Manages the overall workflow, including logging, raster mask creation, and VRT generation.create_raster
: Generates a raster mask for a given feature's geometry and saves it as a.tif
file.create_raster_vrt
: Combines all generated raster masks into a VRT and adds it to the QGIS map.Error Handling:
VRT function and Rescaled index score to range [ 0 - 5 ]
VRT -1:
VRT-2:
VRT-3:
VRTs added to map (For the three indexes):
Directory structure:
lower level: