I am running a query for Ways by name using a regex. I recurse down to get the nodes and all data returned appears fine with the exception that the one "road" with the one name thats being queried returned multiple ways. Ultimately all the ways attach and is physically the same "road". I am using this as a typeahead for a user to select a "road" and then later I will use that "road" they selected to offer them a list of other Ways that intersect with this "road"... As you can probably see when I run the later query for a list of intersecting Ways i cannot just simply reference just one Way ID from the initial query as there are many Ways that represent what a user would consider the "road" they were looking for... Am I missing anything? Is there any sort of "Parent" way that can be referenced. Why is one road represented as more than one Way? Is it simply a data quality issue that someone needs to merge them or is this by design? Is there any way in the API for me to write my followup query that starts with one of the ways at random but then basically say (in pseudocode)
Give me way # 1234, plus any ways that have the same name as 1234 and share at least one node (meaning they are truly one "Road") ->then return me a list of Ways that intersect with those ways.
I can figure out the query to get the intersections, the more important part is trying to treat the initial way as one single road.
Initially I was thinking I would handle the merge of the Ways in my code and sort of cache a "parent" way that all the individual ways would be children of and then my second query would basically list all the individual ways. Seems like its more complicated for me to do manually and i'm thinking there must be a way to handle this natively in the API...