I want to create a tricky overpass query, but im not sure how to do it and im hoping someone knows the answer I want to
I did try to create something in overpass-turbo, but it quickly became a mess and didn't output what I wanted Help! asked 08 Apr '18, 19:30 FredrikLindseth |
It's currently not possible to restrict an area query with an area, so it is necessary to use map_to_area calls to work down through the areas. You can see at the top I've commented out the code to fetch all the admin_level 4 entities in Norway and instead just fetch 1 of them, because the script times out with more than 1. Anyway, this script emits the tags for each admin_level=4 and then emits the tags for each admin_level=7 and then any place=farm found within that admin_level=7. So processed as a stream, each farm will belong to the last seen county and municipality.
You can also look at https://github.com/drolbr/Overpass-API/issues/187 for some discussion of how to fetch points with containing areas. answered 09 Apr '18, 19:32 maxerickson That worked very well! I changed the output to
(12 Apr '18, 00:42)
FredrikLindseth
|