Distortion-Aware Spatial AI · Interactive Demo

MapFix-Spatial

Take warped geographic coordinates, estimate the distortion field, and iteratively un-warp them back onto a clean map projection by fixed-point iteration, live in the browser, with residual and area-recovery metrics and an optional LLM layer that narrates the fix.
Arun Sharma
University of Minnesota · interactive MVP
Fixed-point inverse warpFinite-difference JacobianLive residual / area metricsOptional LLM layerRuns offline

Abstract

Geospatial coordinates arrive distorted all the time: bad georeferencing, projection mismatches, sensor warp. MapFix is the interactive, clickable face of "detect and undo that distortion." You give it points; it models the distortion as a smooth field, inverts it by fixed-point iteration, and shows the residual error and how much area it recovered, live. It is the lightweight demo of the same distortion-aware geometry theme that runs, at more depth, through the author's satellite-splatting (camera Jacobians) and SAR/optical co-registration work.

Honest scope. This is a single-file interactive MVP (server.py, ~457 LOC) plus a browser front-end, not a trained model. The distortion-and-correction math is real and deterministic and runs; the distortion itself is a synthetic, parametric model (a "Mercator repair" profile with curve/shear knobs), so it demonstrates the method on controllable distortion rather than on real misregistered maps. The OpenAI calls are an optional flavor layer; without a key it falls back to a deterministic summary, so the demo runs offline.

How the correction works

Distorted coordinatesraw geo pointsDistortion detectorresidual / outlier scanDeterministic correction engineclosed-form fit, exactClean map projectionrendered outputOptional model-backed analysisLLM-assisted pathHonest scopeThe deterministic correction engine is real and tested; the model-backed analysis path is optional.Shipped as a live browser demo.green = real and testeddashed amber = off-the-shelf / targetblue = learned / core method
The warp is raw = clean + D(clean); inversion is the fixed-point iteration clean ← raw - D(estimate), which converges when D is a contraction.

The gradient_at routine finite-differences the distortion field for a local 2×2 Jacobian, used to diagnose convergence, conceptually the numerical cousin of the closed-form camera Jacobians in the author's sat-splat work. The LLM never touches the geometry; that stays in the deterministic engine.

What is real vs scaffold

ComponentStatus
Georeferencing on the real Web Mercator distortion (TPS)Reproduced: a thin-plate spline fit to real GCPs against the genuine Web Mercator projection cuts held-out ground RMSE from ~1,338 km (raw) / ~24 km (affine) to ~2.5 km (89% better than affine); see EVIDENCE
Distortion model + fixed-point correction + metricsReal, deterministic, runs. Illustrative demo: recovers ~72% of the distortion (mean residual ~2.8 px) on a synthetic Mercator-repair profile
Interactive browser demoReal, live
OpenAI text + image layerReal but optional (falls back without a key)
Correction of real scanned misregistered mapsNot yet (the interactive demo's distortion is synthetic; the reproduced RMSE above uses the real Web Mercator distortion)

Honest next step

The thin-plate-spline georeferencing on real GCPs against the real Web Mercator distortion is done (held-out RMSE above). Next: extend to real scanned maps with manually digitized GCPs (lens/rubber-sheet warp), and add a 2nd-order polynomial baseline alongside affine and TPS.

One theme, three levels of depth

MapFix (here)

Estimate and invert a coordinate warp, the principle at its simplest and most demo-able.

Sat-Splat-Distort / DarkVesselNet

The same distortion-aware geometry with closed-form camera Jacobians and real SAR↔optical sensor co-registration. One continuous distortion-aware story.