[pgrouting-users] indifcating one way streets with
to_cost/reverse_cost
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Jan 24 21:28:09 EST 2012
Dave,
I believe either can be used. Using a high value will allow you to
traverse the oneway street in reverse if there is no other way to go
rather than fail. Using -1 will eliminate the edge from the directed
graph. Which you use depends on your use case and the type of analysis
you are performing. In a general sense either should work.
Daniel - you have anything to add to this?
-Steve
On 1/24/2012 6:21 PM, Dave Potts wrote:
>
>
> I am confused about the one way street issues.
>
> The page http://www.pgrouting.org/docs/howto/oneway.html, says use a high
> cost value eg 1000, but the page
> http://www.pgrouting.org/docs/1.x/dijkstra.html says 'a negative cost will
> prevent the edge from being inserted in the graph' ie use -ve value for a
> cost.
>
> Which is thecorrect value to use ?
>
>
> Dave.
>> ============================
>> Daniel Kastl wrote:
>>> On Wed, Jan 18, 2012 at 4:31 PM, Dave Potts<dave.potts at pinan.co.uk>
>>> wrote:
>>>
>>>> Ok the matter is addressed in
>>>>
>>>> http://www.pgrouting.org/docs/howto/oneway.html
>>>>
>>>> You just make the value for the cost to be very high, is there a given
>>>> value that should be used?
>>>>
>>>
>>> Well, you can make it high that you can be sure that it will be longer
>>> than
>>> what could be a valid total length of a route.
>>> And if your result will be longer than that, you can assume that it took
>>> a
>>> one-way street in the wrong direction, because probably there was no
>>> other
>>> way.
>>>
>>> Daniel
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> Dave Potts wrote:
>>>>>
>>>>>
>>>>> Hi
>>>>>
>>>>> Is there a way of saying the link between nodes A and B in a given
>>>> network
>>>>> is a one way connection?
>>>>>
>>>>> I had assume that setting the to_cost/reverse_cost would be the way
>>>> to
>>>> go,
>>>>> but I have not see this type of thing describe on any of the web
>>>> pages.
>>>>>
>>>>> regards
>>>>>
>>>>>
>>>>> Dave.
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pgrouting-users mailing list
>>>>> Pgrouting-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> _______________________________________________
>>>> Pgrouting-users mailing list
>>>> Pgrouting-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>>>
>>>
>>>
>>>
>>> --
>>> Georepublic UG& Georepublic Japan
>>> eMail: daniel.kastl at georepublic.de
>>> Web: http://georepublic.de
>>>
>>
>>
>> --
>>
>>
>
>
More information about the Pgrouting-users
mailing list