Tutorial: Conflict Index#
Important
Before proceeding, make sure your project structure is fully configured. See Tutorial: Setting Up a PEM Project.
Overview#
The Conflict Index quantifies the spatial probability of interaction conflicts between ocean users within a given scenario.
Unlike the Habitat Risk Index, which integrates ecological exposure, the Conflict Index focuses exclusively on user–user spatial overlap.
Ocean Users may be represented as:
Boolean footprint rasters (0/1 presence); or
Continuous fuzzy rasters (values between 0 and 1).
The Conflict Index is computed as:
Pairwise raster multiplication between all user combinations;
Weighting of each overlap using a conflict matrix;
Aggregation of weighted overlaps;
Final normalization to a 0–1 scale.
The result is a normalized spatial indicator representing the relative likelihood of conflict within the scenario.
See also
Learn more on the Conflict Index in About: Conflict Index
See also
Ensure that Ocean Users have been properly configured before computing the Conflict Index. See Tutorial: Setting Up a PEM Project and Populate Ocean Users.
Complete Workflow#
setup_conflict_matrix()
(Optional but recommended) Adjust conflict weights
get_conflict_index()
Each stage is detailed below.
1. Script: Initialize the Conflict Matrix#
Before computing spatial conflicts, a conflict weight matrix must be defined.
Run:
setup_conflict_matrix(folder_project, scenario)
Example:
Script example
# !WARNING: run this in QGIS Python Environment
import importlib.util as iu
# define the paths to the module file
# ------------------------------------------------------
file = "path/to/conflict.py" # change here
# define the project folder
# ------------------------------------------------------
folder = "path/to/folder" # change here
# define scenario
# ------------------------------------------------------
scenario = "baseline"
# call the function
# ------------------------------------------------------
# do not change here
spec = iu.spec_from_file_location("module", file)
module = iu.module_from_spec(spec)
spec.loader.exec_module(module)
output = module.setup_conflict_matrix(
folder_project=folder,
scenario=scenario
)
print(" ----- DONE -----")
What the function does:
Scans all user rasters under:
{project}/inputs/users/{scenario}Identifies all user layer names;
Creates a square CSV matrix;
Initializes the lower triangle with value 1;
Sets diagonal and upper triangle to 0.
The generated file:
{project}/inputs/users/{scenario}/conflict.csv
This CSV defines pairwise conflict weights between users.
2. Manual Step: Adjust Conflict Weights#
By default, all user pairs are assigned weight = 1.
However, in realistic marine spatial planning contexts, conflict intensity is not uniform across activities.
Examples:
Offshore wind vs tourism → potentially high conflict
Fisheries vs conservation zones → context-dependent
Submarine cables vs shipping lanes → possibly low conflict
Compatible activities → zero conflict
The user should manually edit conflict.csv to reflect
domain knowledge, policy priorities, or stakeholder input.
Important notes:
Only the lower triangle is used.
Diagonal values are ignored.
Weights typically range from 0 (no conflict) to 1 (maximum conflict), but any non-negative numeric value is allowed.
Symmetry is assumed.
Although optional, adjusting weights is strongly recommended to ensure realistic conflict representation.
Conflict Matrix example
users , cargo , fisheries , tourism , oilngas , offshwind
cargo , 0 , 0 , 0 , 0 , 0
fisheries , 5 , 0 , 0 , 0 , 0
tourism , 10 , 7 , 0 , 0 , 0
oilngas , 13 , 9 , 6 , 0 , 0
offshwind , 8 , 4 , 3 , 11 , 0
3. Script: Generate the Conflict Index#
Once the matrix is finalized, compute the Conflict Index:
get_conflict_index(folder_project, scenario)
Example:
Script example
# !WARNING: run this in QGIS Python Environment
import importlib.util as iu
# define the paths to the module file
# ------------------------------------------------------
file = "path/to/conflict.py" # change here
# define the project folder
# ------------------------------------------------------
folder = "path/to/folder" # change here
# define scenario
# ------------------------------------------------------
scenario = "baseline"
# call the function
# ------------------------------------------------------
# do not change here
spec = iu.spec_from_file_location("module", file)
module = iu.module_from_spec(spec)
spec.loader.exec_module(module)
output = module.get_conflict_index(
folder_project=folder,
scenario=scenario
)
print(" ----- DONE -----")
Computation Steps#
The function performs:
Identification of all unique user raster pairs.
Pairwise raster multiplication:
Normalization of each pairwise overlap.
Weighting using the conflict matrix:
Summation of all weighted overlaps.
Final normalization of the aggregated map.
Output:
{project}/outputs/{scenario}/{scenario}_conflict.tif
The output raster:
Is continuous;
Is normalized between 0 and 1;
Represents relative spatial conflict probability;
Is comparable between scenarios.
Conceptual Interpretation#
The Conflict Index measures spatial coincidence of activities, weighted by their incompatibility.
Conceptually:
User A × User B
User A × User C
User B × User C
↓
Apply conflict weights
↓
Sum weighted overlaps
↓
Normalize (0–1)
Important clarification:
The index magnitude is normalized per scenario. Therefore:
Absolute values may not be directly comparable across different spatial extents or user compositions.
Spatial patterns and relative intensities are the primary interpretation targets.
The Conflict Index can now be integrated into the multi-criteria Performance Index framework.