[OSM-dev] Indexing of PBF files

mmd mmd.osm at gmail.com
Sun Feb 13 09:56:18 UTC 2022


On 2/13/22 10:17 AM, codesoap--- via dev wrote:
> I think I'll take a closer look at the Overpass-API, but I still view
> this as a workaround, since it makes me dependent on an internet
> connection and on the provider of the API (because I don't want to
> burden the users of my tool with setting up their own Overpass-API).

If you don't need minutely updates, you can run Overpass API on command
line without installing anything. This can be achieved using two
different tools:

* `update_database` to load your OSM XML (or PBF) into a database,
essentially a set of index based binary files, and
* `osm3s_query` to later query your database using the Overpass QL.

What's left to do for a user is to download the sources, and compile
them. Docker images do exist to facilitate that step.

Your example "sachsen-latest.osm.pbf" took around 2 minutes here to
load. As always, this highly depends on a number of factors, such as
hardware, Overpass release, compression settings, etc. Final db size was
4.3GB on lz4. Choosing a different compression might bring that number
down further.

-- 




More information about the dev mailing list