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

`.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](/routing). Both are in the [specification](/glx/spec); geolith's builder does not write a routing part yet, see [The routing part](/routing/routing-part). The file header lists a file's parts, and a reader reads only its own part; see [Concepts](/glx/concepts#parts).

|         | Tiles                                 | Geocoding                                    |
| ------- | ------------------------------------- | -------------------------------------------- |
| Builder | [geolith](/builder) writes `.pmtiles` | [geolith](/builder) writes `.glx`            |
| Server  | [geolith Tiles](/tiles)               | [geolith Search](/search)                    |
| Viewer  | [pmtiles.io](https://pmtiles.io)      | [.glx viewer](https://demo.geolith.app/glx/) |

## Start here

- [Concepts](/glx/concepts): what is in a file and how a reader answers a query.
- [Specification](/glx/spec): the version 1 format, byte by byte, with its [changelog](/glx/changelog).
- [Create a file](/glx/create): from Overture Maps and OpenStreetMap, or from your own table.
- [Command line](/glx/cli): `glx-build`, `glx-query` and `glx-parts`.

## Open a file

The [.glx viewer](https://demo.geolith.app/glx/) 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](/glx/fixtures/places.glx), [places-optional-off.glx](/glx/fixtures/places-optional-off.glx), [streets.glx](/glx/fixtures/streets.glx) and [fixtures.json](/glx/fixtures/fixtures.json).
