Preface

This is a project worked on by me during my final year (2025) at UofT in GGR494 (Special Topics in GIS). In a nutshell, I used the Analytic Hierarchy Process (AHP) to weight four factors for a flood susceptibility model: Topographic Wetness Index, elevation, slope, and floodplain proximity. The weights come from a pairwise comparison matrix, checked for consistency, with every calculation done in R.

Introduction

Under the framework of Multi-Criteria Decision Making (MCDM), sits Analytic Hierarchy Process (AHP). Which is a process not just utilized in management, business, and government, but has been used for geospatial flood analysis (GFA) in modern research. How AHP is used for GFA is determining assigned, weighted values to variables that would affect a location’s susceptibility to flooding.

Example

In a more broader sense, AHP is really a decision making process for when you must compare multiple variables relatively against each other; where some variables are more important than others, to make a decision based the output of your process. Let’s be more specific, if you had to choose between two preferred pies, apple pie (call this option A) and blueberry pie (option B). You would choose one or the other, in this case, you choose apple pie (A) and make the decision to hold option A as being more valuable than option B.

Seems easy, right? But what if we added two more options? Pecan pie (option C) and pumpkin pie (option D). All of a sudden you now have to evaluate all permutations of every single comparison. “Well I do like A over B but I think C is better than A but I’ll always take B over D…” is how most thought processes would probably go after.

AHP is now used to determine (or compute) these permutations and derive a model in which you can now base decisions off of. So let’s now move on to the application of it in flood analysis.

Key Factors in Flood Analysis

What I have determined to be the most important variables in assessing flood susceptibility are Topographic Wetness Index (TWI), Elevation, Slope, and Floodplain Proximity. TWI being an index that represents surface flow accumulation (where the water would accumulate), which is determined from a slightly complex set of processes and algorithms. Or at least not relevant to AHP directly. However, what’s important to note is that it utilizes elevation, slope, and flow direction. Remember this for a little bit. The rest of the variables speak for themselves, elevation is elevation, slope is the degree in which each raster cell is recorded at, and floodplain proximity is how close each cell is to the flood plain.

Limitations for your own processes

However, if it were up to me, I would have chosen other factors instead. A limitation of this project was the lack of geospatial data to be utilized that was available or free. If you are familiar with flood analysis or GIS hydro-work, then you could maybe pick out a few glaring issues with this choice of variables.

It’s mainly that the variables are redundant to the model (elevation, slope are included inside of TWI). Would it make sense to evaluate slope and elevation as other variables in AHP if it’s already a component of TWI? Yes and no; if you are evaluating elevation or slope by itself for a different reason, then it would be okay. In this case, it was done due to no other variables being able to be chosen.

It would be important to evaluate this for yourself if you were to use AHP.

Pairwise Comparison Decision Matrix

Building the initial matrix is the foundation of the process. A subjective judgement is made utilizing logical reasoning, academic literature, etc. (informative reasoning) to then rank each variable against each other. Essentially, how much more important one variable is to another. The scale I had used was Saaty’s Fundamental Scale (1–9), where 1 indicates equal importance and higher values reflect increasing dominance.

PCDM <- matrix(c(
  1,   3,   5,   7,
  1/3, 1,   4,   6,
  1/5, 1/4, 1,   3,
  1/7, 1/6, 1/3, 1
), nrow = 4, byrow = TRUE)

colnames(PCDM) <- rownames(PCDM) <- c("TWI", "Elevation", "Slope", "Floodplain")

The matrix reads row against column: a 3 in the TWI row under Elevation means TWI is judged moderately more important than Elevation.

Pairwise comparison matrix (Saaty scale)
TWI Elevation Slope Floodplain
TWI 1 3 5 7
Elevation 1/3 1 4 6
Slope 1/5 1/4 1 3
Floodplain 1/7 1/6 1/3 1

Diagonally, a rating of 1 is set as it would be comparing each variable against itself.

Normalized Pairwise Comparison Decision Matrix

Next, the scores must be normalized. This would allow us to compute the relative priority (weight) of each variable.

PCDM_norm <- sweep(PCDM, 2, colSums(PCDM), FUN = "/")
Normalized matrix (each column sums to 1)
TWI Elevation Slope Floodplain
TWI 0.597 0.679 0.484 0.412
Elevation 0.199 0.226 0.387 0.353
Slope 0.119 0.057 0.097 0.176
Floodplain 0.085 0.038 0.032 0.059

Average Weights Criteria

Determining the average weight of each variable occurs now, you would take an average of each row in the normalized matrix.

weights <- rowMeans(PCDM_norm)
weights
##        TWI  Elevation      Slope Floodplain 
## 0.54286797 0.29132917 0.11229168 0.05351118

Overall Score (Weights Sum Vector)

AHP requires verifying that our decisions maintain a degree of internal consistency. To do this, we first compute the weighted sum vector, which multiplies the original comparison matrix by the derived weights.

overall_score <- PCDM %*% weights
overall_score
##                 [,1]
## TWI        2.3528922
## Elevation  1.2425190
## Slope      0.4542311
## Floodplain 0.2170492

This step evaluates how closely the weights reflect the original pairwise judgments. Conceptually, if the judgments were perfectly consistent, each row of this product would be proportional to its corresponding weight.

λ Average values (vector)

To measure consistency, we compute a vector of λ values by dividing each element of the weighted sum vector by the corresponding weight. These λ values indicate how stable and consistent each individual comparison pattern is.

lambda_vec <- overall_score / weights
lambda_vec
##                [,1]
## TWI        4.334189
## Elevation  4.265000
## Slope      4.045100
## Floodplain 4.056146

A perfectly consistent decision matrix would yield identical λ values across all criteria. The small differences in these values reflect the natural variation in subjective human judgment.

λ Max

To evaluate the matrix’s overall consistency, AHP uses the maximum eigenvalue approximation, known as λ_max. In a fully consistent matrix, λ_max equals the number of criteria (n). Any deviation above n reflects inconsistency.

lambda_max <- mean(lambda_vec)
lambda_max
## [1] 4.175109

Here, λ_max ≈ 4.175, only slightly above 4, which already indicates a strong level of consistency.

Consistency Index

The Consistency Index (CI) measures the degree of deviation from perfect consistency. Larger deviations mean the subjective comparisons contradict themselves more often.

n <- nrow(PCDM)
CI <- (lambda_max - n) / (n - 1)
CI
## [1] 0.0583696

The CI value of ~0.058 shows that inconsistency is present but remains low—well within acceptable limits for subjective decision-making.

Consistency Ratio

To understand whether the matrix is “consistent enough,” AHP compares the CI to a Random Index (RI), which represents the expected inconsistency of a randomly filled matrix of the same size.

RI_table <- c(0, 0, 0.58, 0.9, 1.12, 1.24, 1.32, 1.41, 1.45)
RI <- RI_table[n]

CR <- CI / RI
CR
## [1] 0.06485511

The resulting Consistency Ratio (CR ≈ 0.064) is well below the commonly accepted threshold of 0.10. This means the pairwise judgments are consistent enough for decision-making, and the derived weights are reliable.

Final Consistency Table

The table below summarizes the entire consistency analysis. This acts as a final check before applying the weights to raster data in a geospatial flood analysis workflow.

AHP consistency table (CR below 0.10 is acceptable)
Measure Value
Lambda max (λmax) 4.175
n (number of criteria) 4
Random Index (RI) 0.90
Consistency Index (CI) 0.058
Consistency Ratio (CR) 0.065

This confirms that the AHP structure used in this project is valid, consistent, and suitable for integrating into the final weighted overlay process for flood susceptibility mapping.