work/carta

Map exporter · driving sim

CARTA

Draw a box on a satellite map and CARTA exports the roads, terrain and aerial imagery for that patch of the world, ready to become a drivable town in a racing sim.

Live

A shift-dragged region with its 221-cell grid.

CARTA is step one of a pipeline for building real places to drive in a sim. Search for a place, shift-drag a region (up to 60 square kilometres) and a live panel shows the corners, the area, how many analysis cells it will make and how many imagery requests that means. Change the cell size, image size or heightmap resolution and the estimate and the grid overlay update immediately.

Runs on
Web app on the home server, local network only
Built with
Plain Node with zero npm dependencies, a hand-written GeoTIFF reader and ZIP64 writer
Started
August 2026

Pick a region

From a search to a grid

  1. The map picker, before any selection.
    The map picker, before any selection.
  2. A place search with a small region selected around a public race track.
    A place search with a small region selected around a public race track.
  3. A shift-dragged region with its 221-cell grid.
    A shift-dragged region with its 221-cell grid.
  4. The same region at 64-metre cells: 850 cells, with the estimate updated.
    The same region at 64-metre cells: 850 cells, with the estimate updated.

What comes out

  • The road network from OpenStreetMap with speed limits, lanes, surface, one-way, bridges and tunnels, plus traffic controls, buildings, nature and parking.
  • A USGS elevation heightmap as raw 32-bit floats with a JSON sidecar.
  • Aerial imagery per cell from the public-domain USGS NAIP survey at about 30 cm per pixel, with a fallback source that is flagged in the manifest.
  • A provider-neutral job queue for a vision model, carrying what the map already claims so a model can contradict it. It is deliberately not wired to any paid model.

Honest speed limits

Every speed limit is labelled as tagged, defaulted by road class, implicit or unparseable, and coverage is coloured red, amber or green. A guessed limit is never passed off as a real one. That matters: in the first test region only a sliver of suburban roads carried a speed tag at all.

How it's built

  • No dependencies. The GeoTIFF reader is hand-written because the elevation service returns tiled rather than stripped TIFFs, and a small ZIP64 writer streams bundles with an exact Content-Length so browsers show real progress.
  • Imagery is fetched for each cell's exact bounding box, so there is no tile stitching and no image library in the container.
  • Some image servers answer errors with HTTP 200, so every image is checked for a real JPEG header before it is saved as a photo. The OpenStreetMap query service wants a descriptive user agent and gets one.
  • Free shared services are treated politely: an area cap and two query endpoints with failover.
  • Elevation was cross-checked against an independent point service and came within a metre and a half.
  • The first full export covered 9.26 square kilometres in 9,212 cells over five and a half hours: a 442 MB bundle, 94% of it imagery.

1 / 4

The map picker, before any selection.
The map picker, before any selection.