.glx docs

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.

By · Updated

From Overture Maps and OpenStreetMap

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

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.

From your own table

To index your own places, load them into a Postgres table with the geocoding columns and run 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 and run a few queries.
  • Run a batch of queries with glx-query and look at the read waves and bytes read.

Serve it

  • Self-host the Search API 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, which answers from a .glx file in R2.