.glx docs

.glx overview

.glx is geolith's single-file format for geocoding, with a routing part in development. 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 R2, S3 or on local disk.

By · Updated

.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.

TilesGeocoding
Buildergeolith writes .pmtilesgeolith writes .glx
Servergeolith Tilesgeolith Search
Viewerpmtiles.io.glx viewer

Start here

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.