TU Dortmund · M.Sc. Seminar (Statistical Disclosure Control)Geospatial & Privacy2024Individual Seminar Paper, Talk & Real-OSM Python Benchmark · Prof. Dr. Rainer Lenz

Anonymization of Georeferenced Microdata

Evaluating how to anonymize individual-level location records against reverse-geocoding attacks on real OpenStreetMap building footprints (Dortmund, Germany + Erie County, NY) without destroying local spatial patterns or disease hotspot detection.

PythonOpenStreetMapEPSG:25832 (UTM)SciPy cKDTreeSpatial PrivacyRipley K/LKulldorff ScanNumPyMatplotlib
100% k-Safe Worst-Case Privacy Floor

Verified Neighbor guaranteed exact target k and 100% verified residential OSM placement in Dortmund vs. 40.1-46.6% valid residential placement and min k = 10 for fixed-radius RP.

12.4 m RMSE Sub-1 km Pattern Fidelity

Besag L(r)-r RMSE below 1 km on Dortmund dropped from 274.3 m (RP 905 m) and 174.9 m (Donut) down to 12.4 m (VN Env k=50) and 21.7 m (VN Env k=100).

0.808 Jaccard Hotspot Scan Recovery

Kulldorff Poisson scan recovered 2.76/3 true Dortmund tiles (0.88 outside) under VN Env k=100 vs. 0.339 Jaccard (4.92 outside) for RP 905 m.

179k Buildings Real OSM Dual-City Audit

125,612 real Dortmund OSM buildings (EPSG:25832) primary benchmark + 53,394 Erie County, NY buildings (EPSG:26918) cross-validation (80,000 runs per city).

The Problem

Why this mattered

Publishing individual-level geospatial records (health registries, mobility logs, or environmental exposure tables) creates a direct reverse-geocoding threat. Coarse postcode aggregation hides addresses but destroys local distance analysis and hotspot detection. Meanwhile, fixed-radius random perturbation cannot adapt to real urban morphology: on compact Dortmund, a 905 m radius over-masks central neighborhoods up to k = 2,570 and scatters ~60% of masked points onto garages, parks, Phoenix-See, or commercial land, while tightening the radius to 500 m drops sparse outskirt privacy down to k = 10.

My Contribution

What I built and owned

Completed individually for Prof. Dr. Rainer Lenz's M.Sc. Seminar on Anonymization of Georeferenced Microdata at TU Dortmund (Winter Term 2023/24). Alongside the 12-page technical report and 40-slide presentation evaluating Wayne Richter's (2018) Verified Neighbor geomasking framework, I built an open-source, unit-tested Python benchmark that fetches real OpenStreetMap building footprints via Overpass, projects WGS84 to metric UTM (EPSG:25832 & EPSG:26918) in pure NumPy, and compares cKDTree Verified Neighbor against Random Perturbation and Donut Geomasking using Hotelling T², Rayleigh tests, Besag L(r)-r, and Kulldorff Poisson spatial scans.

Real-OSM Pipeline, Geomasking Engine & Spatial Audit

01 · Real OSM & UTM Projection

Dortmund (125k) + Erie County (53k)

Fetched public OpenStreetMap building centroids via Overpass and projected them to exact metric UTM (EPSG:25832 for Dortmund, EPSG:26918 for Erie County) using 4th-order transverse Mercator series in pure NumPy. Handled real German ALKIS vs. US NYS GIS building-tag differences to isolate 58,462 verified residential buildings in Dortmund and 50,252 in Erie County, sampling 160 residential centroids per city (100 uniform-null background + 35 primary + 25 secondary cluster; zero personal data).

02 · Spatial Masking Engine

cKDTree Verified Neighbor vs. Baselines

Benchmarked Verified Neighbor (SciPy cKDTree over verified residences with a strict 50 m exclusion ring and optional environmental service-zone matching, k = 50 to 350) against uniform-area Random Perturbation (r = 500 m European scale and r = 905 m Richter baseline) and density-adaptive Donut Geomasking (Hampton et al., k_min = 100).

03 · Privacy & Utility Audit

50 Replicates, Ripley L(r) & Kulldorff Scan

Audited 10 masking configurations x 50 Monte Carlo runs per region (80,000 masked realizations per city): worst-case realized k, <= 25 m residential placement validity, Hotelling T² mean-center shift, Rayleigh circular directional bias, Besag L(r)-r pattern RMSE, and Kulldorff discrete Poisson cluster Jaccard recovery.

Dortmund, Germany: 50-Replicate Spatial Privacy vs. Utility Benchmark (125,612 Real OSM Buildings)

Projected to EPSG:25832 (UTM 32N; 58,462 residential, 67,150 non-residential, 12 x 12 metric grid, 160 subjects, seed = 42).

Geomasking MethodAchieve k (%)Min / Max kValid Res. (%)Same Env (%)Mean Disp (m)Sub-1 km L(r) RMSECluster Jaccard
Random Perturbation (r = 500 m) 98.8% 10 / 1,101 46.6% 96.3% 336.2 m 130.1 m 0.385 (2.52 / 4.44)
Random Perturbation (r = 905 m) 99.4% 57 / 2,570 40.1% 88.1% 600.7 m 274.3 m 0.339 (2.36 / 4.92)
Donut Geomasking (k_min = 100, Env) 99.4% 95 / 4,227 45.3% 100.0% 558.3 m 174.9 m 0.355 (2.28 / 4.52)
Verified Neighbor (All, k = 50) 100.0% 50 / 50 100.0% 98.4% 105.9 m 13.8 m 0.645 (2.54 / 1.62)
Verified Neighbor (All, k = 100) 100.0% 100 / 100 100.0% 98.3% 143.7 m 27.1 m 0.627 (2.48 / 1.76)
Verified Neighbor (Env, k = 50) 100.0% 50 / 50 100.0% 100.0% 109.7 m 12.4 m 0.768 (2.70 / 1.06)
Verified Neighbor (Env, k = 100) 100.0% 100 / 100 100.0% 100.0% 154.5 m 21.7 m 0.808 (2.76 / 0.88)
Verified Neighbor (Env, k = 200) 100.0% 200 / 200 100.0% 100.0% 224.0 m 32.4 m 0.704 (2.68 / 1.64)

Cluster column shows mean Jaccard (true in / false outside of 3 ground-truth Dortmund tiles). Cross-region validation on Erie County, NY (EPSG:26918, 53,394 real OSM buildings, mirroring Richter 2018) confirmed the same pattern: RP 905 m left 11/160 subjects below k = 100 (min k = 40, 36.5% valid res., 409.3 m sub-1 km RMSE) and Donut smeared the 9-tile cluster across 10.22 outside tiles (Jaccard 0.246), whereas Verified Neighbor (All, k = 50) achieved 100% exact k, 149.3 m mean displacement, 33.9 m sub-1 km RMSE, and 0.916 cluster Jaccard (0.06 outside). Full Erie County CSV and plots are stored in the repository.

Dortmund OpenStreetMap Diagnostics & Cluster Scans

Generated directly by src/run_benchmark.py on 125,612 real Dortmund OSM buildings (EPSG:25832; map data (c) OpenStreetMap contributors, ODbL 1.0). Click any figure to inspect full resolution.

Key Takeaways

  • Running on two real OSM cities exposes why hand-tuned fixed radii fail in production: Richter's 905 m Erie County radius massively over-masks compact Dortmund (up to k = 2,570) while still dipping below k = 100 on outskirts, and tightening to 500 m drops worst-case privacy to k = 10 in Dortmund and leaves 21.2% of Erie County subjects below k = 100.
  • Verified Neighbor eliminates impossible coordinates (zero points in lakes, parks, garages, or industrial zones), cuts mean displacement by 4x to 5.6x in Dortmund (105.9-154.5 m vs. 600.7 m RP 905 m), reduces sub-kilometer L(r)-r RMSE by up to 20x, and lifts Kulldorff cluster Jaccard from 0.339 to 0.808 (and 0.916 on Erie County).
  • Real street networks naturally introduce directional pull at parks, rail corridors, and city edges: Hotelling T² (61.9%-71.9%) and Rayleigh (65.6%-72.5%) rates on Dortmund OSM match Richter's original Erie County empirical findings (43%-74% and 43%-69%), while strict environmental zone matching pushes rural search jumps up to 4.4 km.
  • Practical deployment requires maintaining current residential address registries (e.g., German ALKIS cadastre or verified OSM building footprints), adapting OSM tag parsers across regions, and sizing k jointly with any non-spatial quasi-identifiers released alongside coordinates.