# geolith and its Consumers

> How geolith's outputs feed tileserver-rs for tiles, geolith search for geocoding, and Valhalla or OSRM for routing.

geolith is the converter. It reads Overture Maps and OpenStreetMap and writes
three kinds of output: vector tiles, a geocoding index, and routing tiles.
Separate servers consume each one.

| geolith output | Format | Consumer |
| --- | --- | --- |
| Vector tiles | `.pmtiles` / `.mbtiles` | [tileserver-rs](https://tileserver.app) ([docs](https://docs.tileserver.app)) |
| Geocoding | `.glx` (default; or `pg-copy`, Photon and Pelias exports) | [geolith search](https://search.geolith.app) ([docs](https://docs.search.geolith.app)) — Pelias-compatible |
| Routing | Valhalla tar (`--output-format valhalla`) or OSRM tar (`--output-format osrm`) | Valhalla / OSRM |

```
Overture Maps ─┐
OpenStreetMap ─┼─▶ geolith ─┬─▶ .pmtiles ────────▶ tileserver-rs
Natural Earth ─┤            ├─▶ .glx ────────────▶ geolith search
shapefiles ────┘            └─▶ Valhalla / OSRM ─▶ routing engines
```

## Vector tiles → tileserver-rs

geolith writes PMTiles v3 archives (Hilbert-ordered, content-deduplicated) or
MBTiles. [tileserver-rs](https://tileserver.app) serves them over HTTP range
requests — one archive on R2, S3, or disk is the whole basemap source. See the
[Pipeline Architecture](/builder/architecture/pipeline) page for how the archive is
built.

## .glx → geolith search

`--output-format geocoding` writes one `.glx` file by default. It holds every
place, address and settlement with a BM25 text index, stored word prefixes for
autocomplete, and a spatial index for reverse geocoding and focus search.
[geolith search](https://search.geolith.app) — a Pelias-compatible API — opens
the file and serves `search`, `autocomplete`, `search/structured` and
`reverse` from it, the way tileserver-rs serves a `.pmtiles` archive. No
database sits between them.

The `pg-copy`, `photon` and `pelias` formats export the same records for your
own Postgres, Photon or Elasticsearch. See the
[Geocoding Output guide](/builder/guides/geocoding-output) for flags and file layouts.

## Routing tiles → Valhalla / OSRM

`--output-format valhalla` writes a Valhalla tar archive
(`--valhalla-output`), and `--output-format osrm` writes an OSRM tar archive
(`--osrm-output`). Valhalla or OSRM then serve routing over the same Overture
and OSM data the tiles and geocoding outputs use.
