OverpassQL query for list of unique names of highways near matched element (use cases such as PoI conflation)

I need some help here on a non trivial spatial query on OpenStreetMap dafa. Examples which return a list of something (such as specific kind of amenity=, like schools, healthcare, etc) already are well documented. I suppose one (not the only one) strategy would use the following general idea:

  1. work with features near/around the target feature (note: almost always literal point of node itself or centroid of a closed way or relation; this is more close to result used for “poi conflation”, not “road conflation”)
  2. custom OverpassQL output (maybe CSV?) focused only in return what’s not in the target element itself
  3. keep reference to original PoI element, such as having original id of node/way/relation as a key for what’s around (it’s not necessary return full tagging/geometry)

This specific query I ask in the title would not need (actually, is better to just return the unique names, maybe sorted by distance) full details of the around elements. Also, use cases tend to be the following:

  1. The targeted PoI neither has addr:street or have, but the external dataset uses another addr:street (which is not merely a misspelled name). This might be easier for human comparing with slippy map on background, but tools making suggestions would fail if is not loaded also near streets (this explain why an example of special query only for get list of alternative street names)
  2. An external data may be using not the name= of highway, but old_name=, alt_name or loc_name (all these don’t show on slippy maps, so humans would need to click one by one and inspect tags :confused:)
  3. The typical use case already has few initial matched PoIs and, when not, users are likely to already focus on a city-level or lower area (so, performance issues with around clause, if any, likely will not matter)
  4. Repeated names (e.g. real world street is just one, but on OSM it may have been split on several ways) better appear just once (preferable the near one)

Thanks in advance!

PS.: one reason to subdivide conflation (see OSM Wiki: Conflation) as “PoI conflation” (hint: a lot of conflation strategies on OSM tend to be “road conflation”) is both because geometry/position alone become less viable and because the metadata (both already in the element, or something near) become main objective. Also, PoI conflation, unless already exist a strong referential code previously added (the ref= and ref:*=) is highly human-in-the-loop. and even when does have strong referential code, any inconsistency (such as external dataset mark as closed or changed and now is another address) human mappers become afraid of move/delete

1 post - 1 participant

Read full topic

Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/overpassql-query-for-list-of-unique-names-of-highways-near-matched-element-use-cases-such-as-poi-conflation/105118