This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to make Overpass QL query from local .osm/pbf

0

Hi, I have about 160k WW geo-coordinates and I need some additional information for each lat/lon. Im already create Overpass QL query but it seems thats take a lot of time to make requests via web (overpass-turbo.eu). Is it possible to make such queries locally? Download planet.osm/pbf and execute overpass ql queries locally using some tools or libs or something similar.

Thanks in advance, Vic

asked 18 Sep '15, 00:48

Gaploid's gravatar image

Gaploid
10113
accept rate: 0%

edited 18 Sep '15, 06:14

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

2

"need some additional information for each lat/lon" is called reverse geocoding if you mean to get an address/description of the location. Is there a reason for you to use Overpass? Maybe there are faster options. If you really only need reverse geocoding, bulk-geo-coding-of-business-addresses .

See https://wiki.openstreetmap.org/wiki/Overpass_API#Introduction for info about the public servers and their capacity/usage policy.

If you want a local instance of Overpass you can get it here https://wiki.openstreetmap.org/wiki/Overpass_API#Developers_.2F_System_Administrators

answered 18 Sep '15, 06:20

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554
accept rate: 18%

Thanks for the answer, I need to find distance to different POIs around each lat/lon therefore I don`t need geocoding. Maybe there is a tool like osmosis to make overpass queries locally or the best way to import planet.osm to POSTGIS and make queries there?

(18 Sep '15, 11:43) Gaploid
3

To run Overpass queries locally, you really need to install Overpass API locally. See the installation instructions for details. Loading a full planet may take quite a bit more than 24 hours (depends on your HW), maybe check out the 'clone' feature. Once you have the DB available, you can run osm3s_query. Skip the parts for dispatcher, attic and minutely updates. You probably don't want that. If you get lost during the installation, simply ask on the Overpass development list (see Installation page for link).

(18 Sep '15, 15:47) mmd

Source code available on GitHub .