[pgrouting-users] Build the "right" direction in a network, from a fixed starting point

Vicky Vergara vicky at georepublic.de
Sat May 19 10:18:09 PDT 2018


H
​i​

On Fri, May 18, 2018 at 12:47 AM, andy <aborruso at gmail.com> wrote:

> I must correct myself: I’m NOT able to read in the data that 3 is not
> reachable from 1.
>
> Thank you
>
>
> Il gio 17 mag 2018, 23:57 andy <aborruso at gmail.com> ha scritto:
>
>> Hi Vicky,
>>
>> On Thu, 17 May 2018 at 20:22, Vicky Vergara vicky at georepublic.de
>> <http://mailto:vicky@georepublic.de> wrote:
>>
>>
>>> I suggest that you follow the workshop,
>>> https://workshop.pgrouting.org/2.4.11/en/index.html
>>> and/or use the sample data of the documentation and do the examples on
>>> the documentation (there is a "tutorial" in the documentation, maybe out of
>>> date, but gives an idea)
>>>
>>> Thank you.
>>
>>
>>> The straight answer to your question is yes, you need a cost (&
>>> reverse_cost is optional)
>>>
>> Now I have a route with a cost:
>> seq path_seq end_vid node edge cost agg_cost
>> 1 1 2 1 1 1875.887941 0.0
>> 2 2 2 2 -1 0.0 1875.887941
>> 3 1 3 1 2 1551.56248159 0.0
>> 4 2 3 3 -1 0.0 1551.56248159
>> 5 1 4 1 3 1506.74402482 0.0
>> 6 2 4 4 -1 0.0 1506.74402482
>> 7 1 5 1 3 1506.74402482 0.0
>> 8 2 5 4 4 1208.08883443 1506.74402482
>> 9 3 5 5 -1 0.0 2714.83285924
>> 10 1 6 1 1 1875.887941 0.0
>> 11 2 6 2 5 1447.12212188 1875.887941
>> 12 3 6 6 -1 0.0 3323.01006288
>>
>> ​I can see in your results that vertex 3 is reachable from 1
​


> The command I have used:
>>
>> SELECT * FROM pgr_dijkstra('SELECT ogc_fid as id, source, target, st_length(wkb_geometry)
>>                            as "cost" FROM linee',1,ARRAY[2,3,4,5,6])
>>
>> The starting point is 1, but I’m able to read in the data that 3 is not
>> reachable from 1.
>>
> ​I don't see your data, can you put the contents of the data​

​The only similar thing as "data" I have is your interpretation of a table
contents​.

This is the data:

SELECT ogc_fid as id, source, target, st_length(wkb_geometry)
                           as "cost" FROM linee;

and maybe this are not the correct interpretation of that data






What’s wrong in my reasoning ?
>>
> ​Maybe what is wrong is how you are interpreting the graph data​



> Thank you
>>
>> [image: immagine.png]
>>
>>>> --
>> ___________________
>>
>> Andrea Borruso
>> website: https://medium.com/tantotanto
>> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
>> ___________________
>>
>> "cercare e saper riconoscere chi e cosa,
>>  in mezzo all’inferno, non è inferno,
>> e farlo durare, e dargli spazio"
>>
>> Italo Calvino
>>
> --
>
> ______
> Scusami per la brevità, ti sto scrivendo dal cellulare.
>
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E EPSG:4326
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pgrouting-users
>



-- 

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44,
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky at georepublic.de
Web: https://georepublic.info

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20180519/791d91b4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 29188 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20180519/791d91b4/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: immagine.png
Type: image/png
Size: 18287 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20180519/791d91b4/attachment-0003.png>


More information about the Pgrouting-users mailing list