[pgrouting-users] TSP and how to contribute

Emre Koc emrekoch at gmail.com
Fri Jan 14 06:03:46 EST 2011


/emre


On Fri, Jan 14, 2011 at 10:36 AM, Daniel Kastl <daniel at georepublic.de>wrote:

>
>
> 2011/1/14 Emre Koc <emrekoch at gmail.com>
>
>>
>> /emre
>>
>>
>> On Fri, Jan 14, 2011 at 10:15 AM, Daniel Kastl <daniel at georepublic.de>wrote:
>>
>>>
>>>
>>> 2011/1/14 Emre Koc <emrekoch at gmail.com>
>>>
>>> Sure
>>>>
>>>> Here is my sql query for that image.
>>>>
>>>> SELECT edges.gid, ST_AsText(edges.the_geom) AS geotext,
>>>>                  edges.ft_minutes,
>>>>  edges.meters
>>>> FROM edges,
>>>> (SELECT edge_id, cost FROM driving_distance('SELECT gid as id,
>>>>  source::integer,
>>>>  target::integer,
>>>>          meters::double precision as cost
>>>>  FROM edges', $startVertexID, $cost,false,false)
>>>> )  as rt
>>>> WHERE edges.gid=rt.edge_id;";
>>>>
>>>> I just give a sample vertex id and a cost value in meters and got
>>>> resulting edges. Normally when I find shortest paths all roads are connected
>>>> so the graph is ok. But this driving directions does not output connected
>>>> roads, thats the thing I do not understand.
>>>>
>>>
>>> Driving distance returns you all the vertices you can reach from a start
>>> point to within what you have defined as the maximum costs.
>>> I think you're looking for another query (Dijkstra, A-Star, Shooting
>>> Star).
>>>
>>
>> I am looking for a output that shows road network that I can reach from a
>> start point within a defined maximum cost. So if driving distance does not
>> output connected edges what do you suggest me to do in order to have a
>> connected road network with the given vertices ? Running shortest path for
>> each vertex does not seem feasible but I am unable to see a way to implement
>> it without going inside c functions.
>>
>>
> Sorry, I was wrong ... it's the right function you're using. Somehow read
> driving directions somewhere before.
> Driving directions does what you need, except that it returns you a list of
> vertices you can reach and the edges column doesn't return anything useful.
>
> This custom wrapper function takes the vertices and calculates a polygon
> that contains all of them:
>
> https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd_wrappers.sql#L78
>

Yes this creates a polygon consisting all vertices but I want to display a
road network that show how to go from source to outlying vertices. Actually
I think driving distance's edge info should give that info since it
calculates a distance from source. If that function know how distant is the
vertice it should know the path am I wrong on this ?

As I wrote, calculating shortest path for each vertex from source does not
seem feasible. Can we make driving distance to show edge info ? I am willing
to conribute in that sense but I don't want to redo what is done before.


>
> Daniel
>
>
>
>
>
>
> --
> Georepublic UG & Georepublic Japan
> eMail: daniel.kastl at georepublic.de
> Web: http://georepublic.de
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20110114/27b66a1c/attachment.html


More information about the Pgrouting-users mailing list