Hi, I am using Overpass API to count the number of POIs for different categories and for different cities. However, the the city names I use, sometimes don't match the ones tagged in OSM. Example: I use "Southbridge Town" but in OSM is listed as "Southbridge" (sometimes using "Southbridge Town" returns some POIs) Example request:
I am looking for a general method for matching my city names with the ones used in OSM using regular expressions or Overpass tools. I use Python to build the query and make the request. Thank you!
This question is marked "community wiki".
asked 09 Mar '22, 10:24 ocabanas |
First to answer your question the solution is ot use the 'something like' operative which you've already used - However it's not required as there's only one Southbridge place.
This routine returns the same results as your routine
answered 09 Mar '22, 18:03 DaveF There was an error in my initial question. I use ["name"="Southbridge Town"] and it should be recognized as "Southbridge". Also, using "addr:city" works well in my tests.
(09 Mar '22, 18:23)
ocabanas
Show the areas produced by the addr:city line. The are no 2Southbridge Town" objects. https://overpass-turbo.eu/s/1gLY
(09 Mar '22, 19:14)
DaveF
|