I was reading some parts of the doc of this c++ lib, and was wondering if there was a way to query the osm server to get the result (for example) of this query in json:
|
Libosmium does not have a networking component, it doesn't talk to any servers. If you want to process the result of the overpass query in your question with libosmium then you'd have to use a different library to execute the HTTP query and then you could feed the response into libosmium for parsing. However, you would not use JSON output for that but raw OSM output - libosmium reads OSM, not JSON. Libosmium provides you with a framework that would allow you to easily extract all bus routes from a country-wide OSM file or even the planet file, without having to query any servers. The osmium command line utility, which is built with the libosmium library, has a "tags-filter" mode that can do what you want. answered 04 Apr '19, 19:01 Frederik Ramm ♦ 2
On Linux and MacOS (but not on Windows), you can give a URL to libosmium instead of a file name and it will use
(05 Apr '19, 08:28)
Jochen Topf
|