Topographic depression analysis to identify campus vernal pools
NotePlate in Algorithmic Prototyping
Map 9 is currently in active algorithmic design. Below is the analytical methodology, step-by-step mathematical model, intermediate conceptual diagnostic, and planned script implementation.
Rendered Map Plate (Design Prototype Placeholder)
Map 9 Placeholder: Conceptual schematic of focal depression extraction and vernal pool candidate detection
Technical Summary
Objective: Detect and delineate potential coastal vernal pools and seasonal micro-wetlands across the UCSB Mesa, North Campus Open Space (NCOS), and West Campus bluffs by modeling local topographic depressions in high-resolution elevation data.
Key Packages:terra, sf, tidyverse
Data Sources:
High-Resolution Campus Digital Elevation Model (source_data/campus_DEM.tif)
Restored NCOS wetlands ground truth (source_data/NCOS_Shorebird_Foraging_Habitat/)
PlanetScope high-resolution wet-season imagery (for spectral water verification)
Delineated vernal pool polygons: output_data/vernal_pool_candidates.shp
Rendered plate: final_output/map_09.png
Step-by-Step Analytical Workflow & Methodology
Coastal vernal pools form where shallow depressions on ancient marine terraces sit above impermeable clay subsoil layers. The detection algorithm models these features using neighborhood focal metrics:
Step 1: Terrain Ingestion & Lowland Tide Masking
Because vernal pools are exclusively perched freshwater depressions, the analysis first eliminates tidally influenced lowlands (such as Goleta Slough and Devereux Slough) by clamping elevations below the spring tide threshold (\(z \le 1.5\text{ m}\) NAVD88).
library(terra)# 1. Ingest campus elevation model (units in feet or meters)campus_dem <-rast("source_data/campus_DEM.tif")# 2. Convert to meters if required and clamp tidal lagoonscampus_dem_m <- campus_dem *0.3048dry_mesa <-clamp(campus_dem_m, lower =1.5, values =FALSE)
A focal moving window (terra::focal) computes the maximum local rim elevation and minimum center elevation. Pixels where the cell elevation is strictly lower than the surrounding neighborhood represent topographic sinks:
\[\Delta z = z_{\text{focal\_max}} - z_{\text{cell}}\]
# 3. Calculate 3x3 and 5x5 focal neighborhood elevation differencefocal_window <-matrix(1, nrow =5, ncol =5)focal_max <-focal(dry_mesa, w = focal_window, fun ="max", na.rm =TRUE)# Calculate depression depth relative to rimsink_depth <- focal_max - dry_mesa
Step 3: Noise Thresholding & Hydrological Fill
Micro-topographic roughness and lidar noise produce hundreds of sub-centimeter artifacts. Candidates are filtered to require a minimum standing pool depth of \(\ge 0.15\text{ m}\) (6 inches) and a continuous inundation basin.
Contiguous depression pixels are clumped into individual discrete pool patches using terra::patches(), vectorized to polygon boundaries with as.polygons(), and filtered by surface area (\(\ge 25\text{ m}^2\)) to remove isolated pixel noise. The extracted vectors are then corroborated against known CCBER restoration records.
# 5. Clump contiguous cells into unique water bodiespool_patches <-patches(candidate_sinks, directions =8, zeroAsNA =TRUE)# Convert to vector polygons and calculate surface areapool_vect <-as.polygons(pool_patches)pool_vect$area_m2 <-expanse(pool_vect)vernal_pools <-subset(pool_vect, pool_vect$area_m2 >=25)# Export shapefilewriteVector(vernal_pools, "output_data/vernal_pool_candidates.shp", overwrite =TRUE)