Geospatial data and models
Geocoding, spatial indexing, routing and satellite imagery — the coordinate systems and accuracy tiers that decide whether an answer is usable.
A geospatial pipeline almost never fails loudly. It returns a coordinate, a polygon, a route or a classified pixel, and the answer looks exactly like a correct answer would. The failure is in the provenance: a point that came from a postcode centroid rather than a building, a distance measured in a projection that stretches by a factor of two at high latitude, a change map that found the sun moving rather than the ground. Nothing downstream can tell the difference, which is why the accuracy tier has to travel with the data.
These pages work from the mechanism outward. Where a number matters it is either taken from the specification that defines it and attributed in the sentence, or derived here from inputs you can change. Where a method has a documented failure mode, the failure mode is the point of the page.
Geocoding Accuracy: What Rooftop, Interpolated and ZIP-Level Actually Mean
The three common match levels describe where a coordinate came from, not how wrong it is — so here is the arithmetic that turns each one into metres.
9 min read
Reverse Geocoding: Turning Coordinates Back Into an Address
What a reverse geocoder actually computes for a coordinate — a nearest-feature search plus a stack of point-in-polygon tests, not a lookup.
9 min read
H3 Hexagonal Spatial Indexing Explained
How H3 turns a coordinate into an integer, what each resolution buys you in metres, and the two places the hexagonal grid does not behave like a grid.
10 min read
Spatial Embeddings for Location Similarity
How POI density, demographics and mobility become one vector per location, and why the preprocessing decides the answer more than the model does.
10 min read
Building an Image Classification Pipeline for Satellite Imagery
A tiling-then-classify pipeline over a Sentinel-2 scene, with the tile arithmetic that tells you how much compute you have just committed to.
11 min read
Shortest-Path Routing Algorithms Explained
Dijkstra and A* on the same worked graph, with the settle order written out — so the difference between them is visible rather than described.
10 min read
Isochrone Maps: How "15 Minutes From Here" Gets Computed
An isochrone is a bounded one-to-many search plus a hull, and both halves have parameters that change the answer more than the travel model does.
9 min read
Geospatial Data Formats: GeoJSON, Shapefile and When Each One Breaks
What RFC 7946 actually mandates, what a shapefile silently does to your schema, and which of the two really loses coordinate precision.
10 min read
Address Matching and Normalization Across Data Sources
A parse-normalise-block-score-corroborate pipeline worked on two records for the same building, including the arithmetic that makes blocking non-optional.
10 min read
Detecting Building Footprints From Satellite Imagery
Segmentation gives you a mask, not a footprint — here is the resolution floor, the vectorisation step and the off-nadir geometry that displaces every roof.
10 min read
Change Detection in Satellite Imagery Over Time
Differencing two dated scenes is one line of arithmetic and four preconditions, and the preconditions are what decide whether the output is change or sunlight.
10 min read
Cloud Masking in Satellite Imagery Before Analysis
The spectral tests a cloud mask runs, worked on real reflectance values, plus the shadow geometry and the compositing bias that follow from masking.
10 min read
NDVI and What a Vegetation Index Actually Measures
Why the normalised difference of two reflectance bands tracks vegetation, what its negative values mean, and where it stops discriminating.
9 min read
Geofencing: How a Radius Trigger Actually Gets Computed
Build a radius trigger from a bounding-box prefilter, a haversine distance and a hysteresis band, and see why the naive version fires all night.
9 min read
Matching GPS Traces to Roads (Map Matching)
How a hidden Markov model turns a noisy sequence of fixes into a route, and why nearest-road snapping fails on exactly the traces you care about.
10 min read
Spatial Clustering for Delivery Zone Design
How to pick a DBSCAN epsilon from measured stop density rather than by trial and error, and why density clusters are not delivery zones.
9 min read
Nearest-Neighbor Search Over Millions of Coordinates
What a spatial index actually removes from a nearest-neighbour query, with the operation count derived at ten million points.
9 min read
What Geocoding a Million Addresses Actually Costs
A line-by-line derivation of a million-address geocoding bill from a labelled per-call price, a deduplication rate and a churn rate.
9 min read
Delivery Route Optimization: What the Algorithm Is Actually Solving
Why routing is a travelling-salesman variant, worked by hand at four stops, and what actually happens between four stops and four hundred.
10 min read
Deliveries Flagged at the Wrong Side of the Road
Why a delivery pin lands across the street from the house, traced to centreline interpolation, a degree-space offset and a flipped cross product.
10 min read
Estimating Population Inside a Custom Polygon
Areal interpolation from census units to an arbitrary catchment, worked line by line, then refined with building footprints.
10 min read
Detecting Duplicate Locations in a Points-of-Interest Dataset
A distance-plus-name-similarity score worked on a real pair, plus the two cases where the threshold that works is guaranteed to be wrong.
9 min read
Why a Distance Calculation From GPS Coordinates Was Wrong by 20%
The 20% is derived from a real coordinate pair, traced to Pythagoras on degrees, and separated from the Web Mercator and lat/lon-swap versions of the same bug.
10 min read
Snapping GPS Coordinates to the Correct Building Entrance
Why an address point that is geometrically correct still sends the driver to the wrong door, and how to build the entrance layer nobody sold you.
10 min read
Other topics
- LLM fundamentals & architecture
- Tokens, tokenization & context windows
- Prompt engineering
- Reasoning models & test-time compute
- Multimodal AI: vision, audio, video
- RAG & retrieval
- Embeddings & vector search
- AI agents & tool use
- Structured output & function calling
- Fine-tuning & post-training
- Local inference errors, string by string
- Running local models day to day
- Testing code that calls an LLM
- Snapshot and property testing for model output
- Regression suites for prompts
- Eval gates in CI
- Flaky tests against a model
- Determinism and the cost of testing
- Contract and streaming tests
- Testing tool calls and retrieval
- Inference, serving & latency
- Rolling out a prompt change
- Testing AI systems in practice
- Forecasting a time series
- Machine learning on tabular data
- Understanding audio that is not speech
- Understanding video
- Core computer vision tasks
- Machine learning on graphs
- Point clouds and 3D
- Evaluation, benchmarks & LLM-as-judge
- Sensor and IoT data
- Logs and event streams
- Models over biological sequences
- Machine learning on molecules
- Embedding and searching code
- Extracting invoices and purchase orders
- Receipts, statements and tax forms
- Insurance policies and contracts
- Deeds, court filings and patents
- Extracting from medical records
- Observability & LLMOps
- CVs, certificates and identity documents
- Shipping, customs and technical documents
- Meetings, email, chat and filled-in forms
- Building an extraction pipeline
- Business, property and inspection documents
- Contract clauses and insurance claims
- Regulated and compliance documents
- Consumer, travel and closing documents
- Mapping one chat API onto another
- SDK and framework migrations
- Hallucination & failure modes
- Re-embedding and model deprecation
- Cutting over between providers
- Parity gaps, shims and legacy endpoints
- Moving between model versions
- Migrating vector stores and caches
- Mapping capabilities and parameters
- Migrating pipelines and agents
- Contracts, runbooks and rollback
- Auditing a codebase before a cutover
- Compliance and fine-tune migration
- LLM cost engineering
- Routing, cost tracking and multi-tenancy
- What a migration does to your prompts
- AI security & prompt injection
- Privacy, compliance & data residency
- AI governance, policy & society
- Building reliable AI applications
- AI hardware, GPUs & compute
- Open-weight models & local inference
- AI for developers & coding agents
- AI in industry: vertical playbooks
- AGI, superintelligence, alignment & the long future
- Machine learning foundations
- NLP fundamentals & classical tasks
- Data engineering for AI
- Synthetic data & dataset curation
- AI product design & UX
- Search, ranking & recommendation
- Enterprise adoption & change management
- AI careers, skills & teams
- Reading AI research
- AI in science & discovery
- Robotics & embodied AI
- AI economics, markets & business models
- AI myths, hype & media literacy
- Context engineering
- Shipping AI features: patterns & anti-patterns
- Build it: end-to-end AI tutorials
- Python for AI: hands-on recipes
- TypeScript, React and the web
- Frameworks and SDKs
- Errors and troubleshooting
- AI facts, numbers and statistics
- The history of AI
- The maths behind AI
- Architectures beyond the transformer
- Reinforcement learning
- Diffusion and generative media
- Speech, audio and voice engineering
- Benchmarks, one at a time
- AI search visibility
- Infrastructure and operations
- Databases and storage for AI
- Knowledge graphs and structured knowledge
- Classical ML in production
- Regulation, jurisdiction by jurisdiction
- Prompt recipes and pattern library
- AI for people who do not write code
- Writing, media and creative work
- Edge and on-device AI
- Interpretability and model internals
- Field notes
- OpenAI model behaviour
- Claude model behaviour
- Gemini model behaviour
- Llama model behaviour
- Mistral model behaviour
- Qwen model behaviour
- DeepSeek model behaviour
- Cohere model behaviour
- Grok model behaviour
- Small model behaviour
- Hybrid model architectures
- Token cost by language and script
- Transliteration, romanization and script handling
- Locale-correct output
- Multilingual generation quality
- Multilingual pipelines
- The EU AI Act, article by article
- AI under the GDPR and EU data law
- US AI regulation, state and sector
- International AI governance and standards
- AI litigation and enforcement
- Running AI workloads on AWS
- Running AI workloads on Google Cloud
- Running AI workloads on Azure
- AI at the edge: Workers, Vercel and Netlify
- Serving models on Kubernetes
- Operating AI infrastructure
- Quantization formats and what they cost
- llama.cpp, flag by flag
- Ollama and the desktop local-model runtimes
- Local models on Apple Silicon
- Hardware for local inference
- Running speech and embedding models locally
- Model files, adapters and conversion
- VRAM arithmetic for local models