Created
September 10, 2019 18:52
-
-
Save Nate-Wessel/e7d72da7c7c12e00a472b41537334f8d to your computer and use it in GitHub Desktop.
overpass query finding parts of split/divided highways - very slow query at present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// identify 3-way intersections of identically named ways | |
// thus to identify/located divided/split roadways | |
// get nodes of all named ways | |
way[highway][name]({{bbox}})->.namedways; | |
// foreach way | |
foreach .namedways -> .thisway( | |
node(w.thisway)->.childnodes; | |
foreach.childnodes -> .thisnode( | |
// select named parent ways of this node with the same name | |
way.namedways(bn.thisnode)(if: t["name"] == thisway.u(t["name"])); | |
// count how many there are | |
if( count(ways) >= 3){ | |
( node.thisnode; .result; ) -> .result; | |
}; | |
); // foreach child node | |
); // foreach named way | |
.result out skel qt; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment