.glx is geolith's single-file format: search, autocomplete, reverse geocoding and lookup by id, answered from one file. A reader keeps a small part of the file in memory and fetches the rest with HTTP range requests, so the file can sit in object storage (R2, S3) or on local disk. It is to geocoding what PMTiles is to map tiles.
A .glx file holds parts: the search part (SRCH), which these pages describe, and the routing part (ROUT), a road graph for geolith Routing. Both are in the specification; geolith's builder does not write a routing part yet, see The routing part. The file header lists a file's parts, and a reader reads only its own part; see Concepts.
| Tiles | Geocoding | |
|---|---|---|
| Builder | geolith writes .pmtiles | geolith writes .glx |
| Server | geolith Tiles | geolith Search |
| Viewer | pmtiles.io | .glx viewer |
Start here
- Concepts: what is in a file and how a reader answers a query.
- Specification: the version 1 format, byte by byte, with its changelog.
- Create a file: from Overture Maps and OpenStreetMap, or from your own table.
- Command line:
glx-build,glx-queryandglx-parts.
Open a file
The .glx viewer opens a local file or an https URL in the browser and runs search, autocomplete, reverse, nearby and place queries on a map. The file is read in byte ranges and never uploaded. A URL must allow cross-origin requests and Range headers.
Sample files
The specification ships small files written by the reference writer, with the values they hold and the answers the reference reader gives: places.glx, places-optional-off.glx, streets.glx and fixtures.json.