I'm currently using the following query to retrieve all the streets/roads within distance of a lat, long location:
However instead of getting a single record for each Street/road, I'm getting back multiple records (ways). Is there a way to get one record per real world road/Street? asked 06 May '18, 02:10 mkhalila |
No, there is not; you will have to write code yourself that combines objects, because for every use case, the definition of what should be one object is different:
answered 06 May '18, 09:12 Frederik Ramm ♦ Thank you for that answer Frederick, that clarifies whether it's possible or not. I suspected I'd have to do it myself. Which is what I've been attempting to do last few weeks but I'm struggling to come up with a way of combining ways into a street whilst maintaining the integrity of the data. I can't just go via the name because two cities may have roads with the same name. I've tried going via ref of the way but that also only covers a small minority of the ways since in certain areas, only a few ways have a ref defined. I could take a request and break it down into tiny requests spanning a tiny region and then join all the data together. That would maintain integrity of data mostly, however it'll create a ridiculous amount of overpass query requests. Is there a way of getting the area/city a way belongs to given the ID and/or name of the way? I can use this to group ways with the same name that belong to the same area.
(06 May '18, 18:56)
mkhalila
Continued: Alternatively, is there a way of getting the lat, long location of a way given its ID and/or name? I could use this location to also group ways with the same name. Or even better, is there a way of modifying the above query to also retrieve the location of that way? Another alternatively, in the above query I'm getting all ways within a certain distance of a lat, long location. At the moment it returns the ways but doesn't return the exact distance they are from the lat,long location. Is there a way of getting that? Apologies for the brain dump, I've thought about possible solutions for months but I'm unsure of how to achieve this within the QL. Any help is always appreciated. Thanks in advance.
(06 May '18, 18:56)
mkhalila
|