Hi, i have a question about overpass results. Im looking for pois with the following query amenity=marketplace OR bar OR biergarten OR cafe OR "fast food" OR "food court" OR pub OR restaurant OR shop=alcohol OR bakery OR butcher OR cheese OR chocolate OR coffee OR deli OR farm OR greengrocer OR organic OR pasta OR patisserie OR pizza OR tea OR supermarket OR pizza OR craft=brewery OR caterer OR winery OR distillery for Seattle i get these results https://monosnap.com/file/l5fDAzCZ7XBNXEPBABB6pr9cQmuIHx for each city i try, the number of pois are more or less the half of the number of nodes, always. Also if i export as kml and convert it to csv i will have only the half of the locations (so, only pois). I scraped yelp, tripadvisor and gmaps for several cities (with other tools) and im sure the results are close to the number of nodes on overpass (not to the number of pois). Check this https://monosnap.com/file/El6H9xwIqHdcAbPrU27SYHjhamug3H how can i extract all the nodes? thanks! asked 22 Jun '21, 11:02 eldoland |
Hi Dave, thanks for your reply ok, try this query amenity=marketplace OR bar OR biergarten OR cafe OR "fast food" OR "food court" OR pub OR restaurant OR shop=alcohol OR bakery OR butcher OR cheese OR chocolate OR coffee OR deli OR farm OR greengrocer OR organic OR pasta OR patisserie OR pizza OR tea OR supermarket OR pizza OR craft=brewery OR caterer OR winery OR distillery in Seattle through the wizard i got this https://monosnap.com/file/l5fDAzCZ7XBNXEPBABB6pr9cQmuIHx if you export the pois, you will get 2k something results but the nodes are twice as much as the pois I scraped Seattle on yelp and tripadvisor with webscraper.io and i got 5928 results. So i guess the number of nodes is more accurate than the number of pois. My question is, how can i get the nodes instead of pois? thanks! answered 22 Jun '21, 17:34 eldoland It's much easier to help you if you post a link using the 'share' button on the Turbo webpage.
(22 Jun '21, 17:59)
DaveF
|
For each POI type, your Overpass query is searching for nodes, ways, and relations.
So the node total that Overpass returns is the number of nodes used to draw all of these things on the map. If even one result is a way or relation, then the total number of nodes will be greater than the total number of POIs. If you search for only POIs mapped as nodes, the node total will be the same as the POI total. See this search (which is just your search with the ways and relations commented out): https://overpass-turbo.eu/s/18HA See the OSM wiki for more detailed information about the data elements: https://wiki.openstreetmap.org/wiki/Elements
permanent link
This answer is marked "community wiki".
answered 22 Jun '21, 18:29 jmapb Hi, thanks for clarifying! so that means that actually osm is missing many pois. I got many more results scraping other resources (yelp, tripadvisor and gmaps). Do you agree? thanks!
(22 Jun '21, 18:53)
eldoland
|
OK. Lots of variables here. First off, don't assume OSM (or other databases) are 100% accurate. Wizard isn't really that detailed. It takes a few, wild guesses For instance your "chocolate" & "coffee" returns vending machine & farm returns beehive! It also searches for both pizza & pasta using cuisine=italian. I /think/ you need to contain the or operators within brackets. It easier to learn to write your own routines IMO. Use the OSM wiki to find the more accurate tags to search for. https://wiki.openstreetmap.org/wiki/Main_Page This is the condensed routine: https://overpass-turbo.eu/s/18HF
Use Use | as a replacement for 'or' Use RegEx ~"^ and )$" to ensure only those individual words are searched for. Use answered 22 Jun '21, 19:19 DaveF Hi DaveF thanks again for your reply! yes totally agree there is no 100% accurate database, that's why i scrape different sources and then i merge them all together. Thanks for the code, will try it and play around with tags!
(23 Jun '21, 12:59)
eldoland
|
Can't do much to help without the full routine. Post a link.
oh ok! here we go https://overpass-turbo.eu/s/18Hu
thanks!