Search OpenStreetMap places and streets from a static file
Locatile is a planned geocoder without a server. A builder turns an OpenStreetMap extract
into one archive file. A small TypeScript library searches that file, either over HTTP
range requests from any static web host or from a copy on the device, so it also works
offline.
Development is planned to start in June 2027. The search below runs a throwaway
experiment from November 2026 that tests the idea on one region.
Try
,
,
,
or
.
The file covers the Regierungsbezirk Köln only: named places, streets, stops and points
of interest. It does not correct typos, does not know abbreviations such as "Hbf" and
has no real ranking.
Requests to the archive
Last search: none yet
Session: 0 requests, 0 bytes (0.0 kB)
Reading from the web host, one range per request.
#
Range (bytes)
Size
Status
Time
No request yet. The first search opens the file.
File none, 3.5 MB. Region:
unknown. Municipalities:
read with the first search. OpenStreetMap snapshot:
read with the first search.
Why
A self-hosted web map no longer needs a tile server: tiles can be a single
PMTiles file. Place search still
does. Today you run Nominatim,
Photon or the lighter
open-geocode on a server,
or you send every keystroke to a commercial geocoding API. The public Nominatim service
does not allow autocomplete.
Locatile is meant to make search work like tiles: you build one file and put it next to
the map. What a user types never leaves their device. The file host only sees which
parts of the file are read, and with a downloaded region it does not even see that.
How the experiment works
The archive holds a header, a sorted list of words in small blocks, a list of matching
records for each word, and the records themselves, grouped by municipality. A search
reads the header, the word blocks it needs, the matching lists and then a few records.
The table above shows each of those reads.
On the Köln file every first search took four rounds of requests and about 32 KiB, and
more than half of the later keystrokes needed no request at all. The measured results,
what the experiment lacks and how to reproduce it are in the
experiment's README.
Planned for version 1
Germany first, then offline packages per federal state.
Named places, streets, public transport stops and points of interest. No house
numbers yet.
A builder as a TypeScript command-line tool that reads .osm.pbf with
osmium-tool and ranks results by type and by
QRank.
A client in plain TypeScript, without WebAssembly, for browsers, Node and React
Native. It returns
geocodejson and comes
with an adapter for
maplibre-gl-geocoder.
A written spec of the archive layout.
The first month is a public benchmark of existing engines (SQLite FTS5 over range
requests, tantivy, FST) against fixed limits for archive size, requests and latency. If
one of them meets the limits, Locatile builds on it.