# Create a .glx file

> Build a .glx geocoding index from Overture Maps and OpenStreetMap with the geolith builder, or from your own Postgres table with glx-build.

## From Overture Maps and OpenStreetMap

The [geolith builder](/builder) writes a `.glx` from Overture `places` and `addresses`, plus OpenStreetMap settlements, venues and addresses when you pass an `.osm.pbf`:

```bash
geolith --data ./overture --osm-pbf ./india-latest.osm.pbf \
  --output ./india.pmtiles \
  --output-format geocoding --geocoding-output ./india.glx
```

`--geocoding-format glx` is the default. `--bbox` limits the file to an area. What gets indexed, how importance is set and the memory and disk a build needs are in the [geocoding output guide](/builder/guides/geocoding-output).

## From your own table

To index your own places, load them into a Postgres table with the geocoding columns and run [`glx-build`](/glx/cli#glx-build). The builder's `--geocoding-format pg-copy` output writes that table's schema and rows, so it is a working example of the columns.

## Check the file

- Open it in the [.glx viewer](https://demo.geolith.app/glx/) and run a few queries.
- Run a batch of queries with [`glx-query`](/glx/cli#glx-query) and look at the read waves and bytes read.

## Serve it

- Self-host the [Search API](/search/self-hosting/index-file) from the file.
- Put it in R2 or S3 and query it from a Cloudflare Worker or the browser with `@geolith/glx`.
- Or call the hosted API at [api.geolith.app](/search/hosted/overview), which answers from a .glx file in R2.
