0

I'm using San Francisco OSM database, which contains the name of each edge, the id source and id target of each vertex. I need to use the information of the most congested routes in San Francisco, but the problem that i didn't found the information that corresponds the data that i have on my data base. For example: Jackson Street to 16th Avenue Overcrossing is a congested road. On my dataset: enter image description here

All these vertex have the same name "Jackson Street" and I don't know which one is the vertex that compose the road to "16th Avenue"

  • sidenote: those are edges, not vertices. if the intersection to 16th Ave (overcrossing?) is what you are looking for, searching for ST_Intersects with proper join conditions might be what you are looking for? also, it seems you used osm2po for the import; the clazz column encodes the road type, e.g. primary, primary_trunc, etc. (google it, I had the reference somewhere, but no time to look it up...), that might help to limit the edge pool further. – ThingumaBob Jun 27 '18 at 12:51
  • thank you @ThingumaBob for your comment but I tried this method but did not find a solution all the paths that starts by the id of "Jackson Street" (as id source) have no relation with the paths that have "16 th street" as id target. I estimate that the jackson road at 16th is composed of several edges, there is no direct path, (the first edge only starts with jackson and the last edge only ends with 16 th) – Reem Jun 27 '18 at 13:10
1

Roads in OSM can consist of multiple ways. If you don't have exact coordinates of the congestion but just the name then I guess all of these vertexes have to be handled as being congested.

This doesn't work very well for long roads. However this is mainly caused by having only the name of the road being congested. Coordinates for the congestion start and end will significantly increase your accuracy.

  • Thank you for your answer, but my problem is that maybe there are roads that have the name of "Jackson Street" and that does not lead to "16th Avenue". So I can't judge that all these roads are congested. – Reem Jun 27 '18 at 12:46
  • 1
    Right. In this case you have to check whether these ways are directly or indirectly connected to "16th Avenue". A connection between OSM ways is defined by sharing the same node ID at the start or end. – scai Jun 27 '18 at 12:53
  • I tried this method but did not find a solution all the paths that starts by the id of "Jackson Street" (as id source) have no relation with the paths that have "16 th street" as id target. I estimate that the jackson road at 16th is composed of several edges, there is no direct path, (the first edge only starts with jackson and the last edge only ends with 16 th). – Reem Jun 27 '18 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.