Posts

Can a Drone Keep a Map True? Weeks 2-4: Fly Only Where It Matters

Image
In week 1 I taught a simulated drone to see cars on Paris streets. That was the easy part. The question of the project is harder: can a drone keep a map true by flying only where a look can change a decision? Weeks 2 to 4 answer it, with the rules written down before the scores. The answer is yes, but the margin is smaller than the headline number says, and that is the interesting part. The source is on GitHub: mraad/map-keeper . The simulator is mraad/drone-sim . A street network small enough to be exact The decision is a car route from Place Saint-Michel (A) on the left bank to the Hôtel de Ville (B) on the right bank. Every route must cross Île de la Cité. I wanted exact inference over every combination of open and blocked streets, with no sampling and no approximation. My own inquisitive-map code does that, with a hard limit: 24 nodes, 40 segments, 256 routes and 12 uncertain segments, so 2 12 = 4,096 possible worlds. The OpenStreetMap data of the scene has 315 intersect...

Can a Drone Keep a Map True? Week 1: Teaching It to See Cars

Image
After the "Decisions you can check" workshop in London this month, I kept coming back to one weak spot in all my spatial decision demos. They decide once, on one snapshot of the map. Real maps get old. A street that the catalog says is open has a delivery truck parked across it, and nobody knows until somebody looks. So I started a new project with one question: can a drone keep a map true? The interesting part is not "fly over everything and look". That is easy and expensive. The interesting part is to fly only where a look can change a decision. The source is on GitHub: mraad/map-keeper , and the simulator is mraad/drone-sim . This post covers week 1 of five: before the drone can be clever about where to look, it must see. The problem A map catalog keeps one record for each street segment. A segment is one street between two intersections. The record says that the segment is open or blocked, and it has an age. In this project, the decision that the catalog s...

Picking an H3 Cell Size with MAUP, and Crossfiltering AIS Pings with DuckDB-WASM

Image
I have a week of AIS vessel pings from NOAA MarineCadastre: 48,734,843 rows from 20,234 vessels in US waters, 2020-01-01 to 2020-01-07. I wanted two things from it. First, a map of pings per H3 cell where the cell size is chosen by a number, not by my eye. Second, a page where I put the pointer on a day and an hour, and the map shows the pings of that hour, instantly, in the browser. This post covers both. All the aggregation runs in DuckDB, on my laptop for the build and in the browser (as WebAssembly) for the interactive views. The source is on GitHub: mraad/heatmap . The ArcGIS crossfilter app. The pointer is on the heatmap cell Monday 12:00 UTC. The pings of that hour glow on the map; all other pings are dimmed. The data An AIS ping is one row in the NOAA CSV: one vessel position ( LAT , LON ) at one time ( BaseDateTime , UTC), with the vessel id ( MMSI ). NOAA publishes one zip per day at https://coast.noaa.gov/htdata/CMSP/AISDataHandler/<year>/AIS_YYYY_MM_DD.z...

Keeping Track IDs Through Full Occlusion: YOLO + a GPU Kalman Tracker

Image
I wanted to know one thing: when an object walks behind a bus, a pillar or another object, and it comes out again a few seconds later, does it keep its track id? Most trackers say yes in the paper and no in the video. The detector cannot see a hidden object, so the tracker must remember it, predict where it goes, and recognize it when it comes back. If the tracker forgets too early, the same person gets a second id, and every count, dwell time and trajectory after that point is wrong. So I built my own tracker. Ultralytics YOLO26 is only the detector. The tracking part is my code: a Kalman filter, a matching cascade and an appearance check, all in PyTorch on the GPU, batched over tracks and over video streams. Then I asked a second question: if the whole loop stays on the GPU, how many frames per second can two GPUs track? The source is on GitHub: mraad/yolo-kalman . Tracker output on "Inbound B Branch train, March 2021" by Flickr user 132192938@N04 ( CC BY 2.0 , vi...

e-means Meets DBSCAN: Two Moons Said Yes, Cairo Said No

Image
Back in 2016, I wrote DBSCAN on Spark . I like DBSCAN because you do not have to give it the number of clusters. But it uses a lot of time and memory when the input is large. This month, Meta FAIR and École des Ponts released e-means in faiss 1.16.0. It does the work of k-means in a few passes over the data. So I asked a simple question: can e-means make the data small, so that DBSCAN can do the rest? In this post, I show how I combined the two and how fast e-means is on a GPU. Then I test the method on real satellite data of Cairo. It did not win there. The source is on GitHub: mraad/emeans-dbscan . The e-means explorer after one run on Cairo with k = 3. All the arithmetic runs in the browser. The terms Vector. One row of numbers. There are n vectors, and each vector has d numbers. Centroid. The center point of a cluster. There are k centroids. Epoch. One pass over all the training vectors. Noise. The vectors that DBSCAN does not put in a cluster. Their...

map-pane: one live map for Claude Code, Codex and Pi

Image
I work most of the day in a terminal with a coding agent. When the work is spatial, I want to see the result on a map. I do not want to leave the terminal, and I do not want to write a web app first. map-pane is my answer. It is a live web map that an agent drives from the shell. The map uses the ArcGIS Maps SDK for JavaScript 5.2.2. Headless Chrome draws the map, and a terminal pane shows it. The pane also takes your mouse and keys, so you can pan and zoom by hand while the agent works. The code is at github.com/mraad/map-pane , MIT licensed. It needs macOS, Node.js 24 and Google Chrome. It has no npm dependencies. I want to keep it that way. What it does The agent can do these things on the map: Add data: GeoJSON (file, URL or inline), GeoPackage, GeoParquet, CSV, feature services, map services, tile and vector tile layers, and portal items. Style data: renderers, labels and filters. GeoJSON with one geometry type gets a legend entry and popups. Move the view: to a geocoded ...