Skip to content

Commit

Permalink
Merge pull request #8 from opengisch/merge-by-matrix
Browse files Browse the repository at this point in the history
Dissolve first by matrice
  • Loading branch information
domi4484 authored Aug 11, 2023
2 parents 5b1c253 + 68642aa commit 3987023
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pzp/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import traceback

from pzp_utils.processing import domains
from pzp_utils.processing.merge_by_area import MergeByArea
from qgis import processing
from qgis.core import (
QgsApplication,
Expand Down Expand Up @@ -246,29 +245,29 @@ def calculate(process_type, layer_intensity):
)

result = processing.run(
"pzp:danger_zones",
"native:dissolve",
{
"INPUT": result["OUTPUT"],
"MATRIX_FIELD": "matrice",
"PROCESS_SOURCE_FIELD": "fonte_proc",
"FIELD": "matrice",
"SEPARATE_DISJOINT": False,
"OUTPUT": "TEMPORARY_OUTPUT",
},
)

result = processing.run(
"native:fixgeometries",
"pzp:danger_zones",
{
"INPUT": result["OUTPUT"],
"MATRIX_FIELD": "matrice",
"PROCESS_SOURCE_FIELD": "fonte_proc",
"OUTPUT": "TEMPORARY_OUTPUT",
},
)

result = processing.run(
"pzp:merge_by_area",
"native:fixgeometries",
{
"INPUT": result["OUTPUT"],
"MODE": MergeByArea.MODE_HIGHEST_VALUE,
"VALUE_FIELD": "grado_pericolo",
"OUTPUT": "TEMPORARY_OUTPUT",
},
)
Expand Down

0 comments on commit 3987023

Please sign in to comment.