In the hyper-dense urban fabric of Hong Kong, a significant portion of the vegetated landscape exists as an "Invisible Forest"βtrees that provide critical ecosystem services and pose potential structural risks but remain omitted from formal municipal registers.
This project establishes a Deterministic Digital Twin to identify the biometric gap between the Physical Reality (detected via 2020 Airborne LiDAR) and the Administrative Record (Municipal Tree Registers). By focusing strictly on Parks, Roads, and Slopes managed by LCSD, HyD, ArchSD, CEDD, and DSD, this study seeks to isolate the "delta" of unmanaged trees.
- CRS: Hong Kong 1980 Grid (EPSG:2326)
- LiDAR Baseline: CEDD 2020 Territory-wide Survey (.laz)
- Land Use Mask: PlanD 2020 Raster Grids (
LUM_end2020.tif)
| Stage | Focus | Primary Tools |
|---|---|---|
| Stage 1 | Jurisdictional Masking | sf, raster, lidR |
| Stage 2 | 2D AI Segmentation | SAM, YOLOv11-seg |
| Stage 3 | 3D Biometric Extraction | lidR (Alpha-shapes, LMF) |
| Stage 4 | Administrative Audit | Geospatial Left-Join |
To ensure the audit is administratively relevant, we use a multi-layered mask to exclude private land:
- Included: Parks (LUM 41/42), Roads (LUM 51), Infrastructure (LUM 61), and SIMAR Slopes.
- Excluded: Private Residential (LUM 1) and Public Housing (LUM 2).
-
Filter Logic:
$Liability Zone = (Public Infrastructure \cup Slopes) \setminus Private Estates$
We use a SAM-to-YOLOv11-seg pipeline to solve the "Cluster Problem" of interlocking broadleaf canopies (e.g., Ficus microcarpa). This provides pixel-perfect polygons instead of simple bounding boxes, allowing for cleaner 3D LiDAR extraction.
Using the AI-generated polygons, we "cookie-cut" the 1.7GB LiDAR tiles.
-
Height Threshold:
$H_{min} > 5.0m$ (Deletes grass, shrubs, and small saplings). -
Metrics: Maximum Height (
$H_{max}$ ), 3D Crown Volume ($V_{crown}$ ), and Vertical Distribution Ratio ($VDR$ ).
# Setup the out-of-core processing engine for large files
library(lidR)
# Initialize the catalog virtually (16GB RAM Safe)
ctg <- readLAScatalog("./data/lidar_tiles/")
# Configure the engine
opt_chunk_size(ctg) <- 250 # 250m squares
opt_chunk_buffer(ctg) <- 30 # 30m overlap for whole crowns
opt_select(ctg) <- "xyz" # Load only coordinates
opt_filter(ctg) <- "-keep_class 2 3 4 5" # Ground + Veg only
# Normalize Height (Find the true height above ground)
normalized_ctg <- normalize_height(ctg, tin())βββ 01_masking/ # Raster-to-Vector jurisdictional masking
βββ 02_segmentation/ # SAM & YOLOv11-seg training scripts
βββ 03_biometrics/ # lidR scripts for volumetric extraction
βββ 04_audit/ # Statistical gap analysis (Rmd)
βββ assets/ # Legends, CRS definitions, and documentation
βββ README.md
- R 4.0+:
lidR,sf,raster,dplyr - Python 3.9+:
ultralytics(YOLOv11),segment-anything,geopandas - Hardware: 16GB RAM minimum (32GB recommended for LiDAR normalization).
- Data Providers: Hong Kong CSDI Portal & CEDD Spatial Data Portal.
- Technical Frameworks: Based on the
lidRpackage (Silva et al.) and theYOLOcomputer vision framework.