[OSRM-talk] via_points in output
Hi, i am trying to build a application around OSM which trys to solve not the traveling salesman but something similar. For this i'd need to find crossing of multiple routes. My first approach would be to put all route geometry nodes into a tree and look for matches. In the end i would only need nodes which have a crossing with another road. So i was looking at the via_points. How are those chosen? Or would it be more feasible to extend the OSRM output a bit to dump these interesting nodes additionally? Flo -- Florian Lohoff f...@zz.de signature.asc Description: Digital signature ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
[OSRM-talk] What is the maximum number of alternate routes?
Dennis, What is the maximum number of potential alternate routes I can safely assume will be returned? Or is there no fixed number? Thanks, -Steve ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] What is the maximum number of alternate routes?
On Mon, Nov 18, 2013 at 11:55:56AM -0500, Stephen Woodbridge wrote: Dennis, What is the maximum number of potential alternate routes I can safely assume will be returned? Or is there no fixed number? Computer says no :) The code says currently only 1 alternative route - at least thats what i found in the code ... Flo -- Florian Lohoff f...@zz.de signature.asc Description: Digital signature ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
[OSRM-talk] route_geometry
Under what circustances does the route geometry really contain the loc= points i gave OSRM to calculate the route. Currently it seems the loc= will only show up if it exactly matches a node which is on a road. Is there a switch to let the route geometry linestring include the point from the street to the loc= position? Flo -- Florian Lohoff f...@zz.de signature.asc Description: Digital signature ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] via_points in output
On Mon, Nov 18, 2013 at 09:08:47AM -0500, Stephen Woodbridge wrote: Or would it be more feasible to extend the OSRM output a bit to dump these interesting nodes additionally? Why not take the route geometries and load them into postgis where you can intersect the routes and get the crossing points? You could alternatively probably do this in C, PHP, Perl or Python using a libgeos wrapper which is the geometry engine that is in PostGIS. I am talking about multiple million routes - My testset has 26k routes. And the point is that after discoverying the intersections i need to delete the routes and calculate 3 new routes. A --x B | | | C Calculating A - B Calculating C - B Finding x Calculating A - x Calculating x - B Calculating C - c Flo -- Florian Lohoff f...@zz.de signature.asc Description: Digital signature ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] What is the maximum number of alternate routes?
On 11/18/2013 12:05 PM, Florian Lohoff wrote: On Mon, Nov 18, 2013 at 11:55:56AM -0500, Stephen Woodbridge wrote: Dennis, What is the maximum number of potential alternate routes I can safely assume will be returned? Or is there no fixed number? Computer says no :) The code says currently only 1 alternative route - at least thats what i found in the code ... Thank you for looking at the code, I was confused by the fact that: route_geometry: string alternative_geometries:[string,...] So alternative_geometries is plural and it is and array object. And route_geometry is singular and returns an string object. Thanks, -Steve ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] What is the maximum number of alternate routes?
On Mon, Nov 18, 2013 at 12:32:20PM -0500, Stephen Woodbridge wrote: Thank you for looking at the code, I was confused by the fact that: route_geometry: string alternative_geometries:[string,...] So alternative_geometries is plural and it is and array object. And route_geometry is singular and returns an string object. It is an array of arrays e.g. it supports multiple alternative geometries from the format. The code does currently only return 1 geometry ever. I guess this can change anytime ;) Flo -- Florian Lohoff f...@zz.de signature.asc Description: Digital signature ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
[OSRM-talk] Need help understanding the json responses
Hi, I'm parsing the json responses and the is going well, but my question is more related what is all this stuff? :) Most of it makes sense, but I'm a little confused by the following: The instructions indicate road names: N20, N60, N2, N61, N28, So the is on the arrive at destination maneuver, but not sure what the rationale for not having a name there. The route summary otherwise states the start point and end point names correctly as N20, N28 How is route_name determined? The wiki page states Array of strings giving the name of roads. There does not appear to be an alternative_names item so this must be unique to the route regardless of alternatives? What are the via_points? How are they determined? These appear to be the mapped locations for the start and end points like if I called nearest?loc=lat,lon Is the position field in the instructions an index into a point in the route geometry array? BTW, thanks for putting up with all my questions, this is all starting to come together. Great job all around! Thanks -Steve GET 'http://imaptools.com:5000/viaroute?instructions=truealt=truez=18loc=43.235198,-76.420898loc=43.709579,-76.286316' {version: 0.3, status:0, status_message: Found route between points, route_geometry: {|zmqA`qjwpC?wyP?o{qBl{qB??m{qBm{qB?o{qB?m{qB?o{qB?m{qB?o{qB?m{qB?o{qB?m{qB??ufN, route_instructions: [ [10,N20,5506,0,2915,5506m,E,90], [3,N60,6542,2,562,6542m,S,180], [7,N2,4771,3,146,4771m,E,90], [7,N61,58884,4,1797,58884m,N,0], [3,N28,627,13,153,627m,E,90], [15,,0,14,0,,N,0.0]], route_summary:{ total_distance:76332, total_time:4676, start_point:N20, end_point:N28 }, alternative_geometries: [], alternative_instructions:[], alternative_summaries:[], route_name:[N60,N61], alternative_names:[[,]], via_points:[[43.235294,-76.420897 ],[43.705882,-76.286315 ]], hint_data: { checksum:52824373, locations: [Dw0AAA4AAADwOAAAdgoAAJqulHdeCOs_3reTAt_ocfs, MRIAABYAAADkBgAAES0AAEeiWVys-sA_GuaaApX2c_s] }, transactionId: OSRM Routing Engine JSON Descriptor (v0.3) } ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] via_points in output
On Mon, Nov 18, 2013 at 12:20:44PM -0500, Stephen Woodbridge wrote: Flo, pgRouting has a function to node a network of lines. It basically does exactly this. It takes a table of linestring geometries, chops all the strings at the intersection and forms a correctly noded result in a new table, maintaining a back reference to the original table so you can move any attributes over to the new table. https://github.com/pgRouting/pgrouting/blob/master/src/common/sql/pgrouting_node_network.sql Let me know if you want to try this and need help getting started. I solved it already much quicker - Breaking down routes in segments who show up multiple times. But to make the long story short - now breaks my graph selection algorithm ;) Some assumptions don't hold up finding the best graph now. So back to the drawing board :) Flo -- Florian Lohoff f...@zz.de signature.asc Description: Digital signature ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk