For a mapping project we have identified a large number of streets that are about to change names. Now we need to map the affected addresses. I'm thinking of a loop that will go through the highways. It should return any objects tagged with and addr:street that is identical to one of the "name" values of the previous query. But only if they are within, say, 250 meter of the object with this name. From what I've seen, this should be possible, but I don't really know how to start. Once the streetname changes take effect, the query can be adapted to compare highway old_name to addr:street, a query which should then over time result in an empty dataset. asked 24 Oct '18, 19:05 joost schouppe |
Try http://overpass-turbo.eu/s/D5q
The foreach statement goes through the input set one element at a time storing the element in .street so it is available inside of the if: block. I stuck the street name in there to speed up testing, you'd obviously want to remove that. (The blog posts about recent releases, like https://dev.overpass-api.de/blog/final_0_7_54.html continue to be the best source of examples for stuff like the if: block there) answered 24 Oct '18, 20:04 maxerickson Thanks! Those release notes are a bit above me unfortunately. I try to learn something every time though. Anyway, if I try this for an entire level 8 admin area, it seems to be too much for the server. But we can always do it one by one if needed.
(24 Oct '18, 20:15)
joost schouppe
|
http://overpass-turbo.eu/s/D5H
minors improvements based on maxerickson query to avoid "out of memory" issue for the whole set :
answered 24 Oct '18, 21:58 marc_marc |