[pgrouting-dev] Help with PG Routing

Vicky Vergara vicky at georepublic.de
Tue Mar 30 17:37:31 PDT 2021


On Tue, Mar 30, 2021 at 4:27 PM Ted Kernan <ted at subsurface.io> wrote:

> Can this function return the shortest path between points IF GIVEN A LIST
> THAT IS NOT ORGANIZED. Or do the points have to be in the order they are
> assumed to be visited?
>

Took me a while to see what was the "this function" you are talking about,
I deduce that is pgr_dikljstraVia.
It is in the order given on the array.
Which by the way is organized,
The first element is the first one visited regardless of its value, the
second element is the second one visited regardless of its value and so on.
So I dont see the lack of organization on an array.

About organization
Curiously I like to organize my books in Topics, and within a topic, they
are organized by book size. But my husband likes to organize his books by
author, and my son likes the "new" books in front and the "old" book
behind. So we organize differently. With collections I win, because they
are all the same size :-)

Regards
Vicky



> On Fri, Mar 26, 2021 at 1:12 PM Vicky Vergara <vicky at georepublic.de>
> wrote:
>
>> Hi,
>> that function is considered "proposed" it has some issues that need
>> fixing before making it official.
>> It works reasonably well. But the integration with the rest of the code
>> was done in a rush (by me).
>> I am very picky even with my own code, it will not be moved to official
>> because I haven't got time to integrate it in such a way that it could be
>> used with other functions like the non existing:
>> pgr_AstarVia
>> Regards
>>
>>
>>
>> On Thu, Mar 25, 2021 at 10:41 PM Ted Kernan <ted at subsurface.io> wrote:
>>
>>> I found this through some googling, I think it’s what I used!
>>> https://docs.pgrouting.org/2.6/en/pgr_dijkstraVia.html#pgr-dijkstravia
>>>
>>> Why does it not show up in the main page?
>>>
>>> Would you suggest anything else?
>>>
>>> As I understand it, this finds the path in the order the array is given.
>>> Is there something that will find the shortest path to an unordered array?
>>>
>>> On Thu, Mar 25, 2021 at 9:59 PM Ted Kernan <ted at subsurface.io> wrote:
>>>
>>>> Hi Vicky!
>>>>
>>>> I hope you are doing well.
>>>>
>>>> I picked up pg_routing again. Unfortunately, I lost my computer last
>>>> year and my code was not backed up :( :(
>>>>
>>>> I am very sad because I had worked out some cool algorithms, which I am
>>>> now trying to recreate.
>>>>
>>>> I am trying to feed an algorithm a list of nodes, and get back the
>>>> shortest route to those nodes through a network.
>>>>
>>>> Which function should I use? I can't seem to figure it out.
>>>>
>>>> Gracias!
>>>>
>>>> Ted
>>>>
>>>> On Wed, Jul 15, 2020 at 9:44 AM Vicky Vergara <vicky at georepublic.de>
>>>> wrote:
>>>>
>>>>> Per se, Those topology functions take a lot of time they use postgis
>>>>> I dont have the data so I don't know
>>>>> pgr_nodeNetwork has a lot of issues and you are using it
>>>>> When I work with real data:
>>>>> - quality of the data
>>>>> - Analysis of the graph
>>>>> - do a step, and analyze the results, study them, decide if the step
>>>>> is good
>>>>>
>>>>> About your problem I would only be guessing because I don't have the
>>>>> data.
>>>>>
>>>>> The topology functions are functions that help to build the graph that
>>>>> is going to be used with pgRouting
>>>>> and in particular pgr_nodeNetwork I don't trust so I always recommend
>>>>> to use on the problematic areas (rows_where).
>>>>>
>>>>> https://github.com/pgRouting/pgrouting/issues?q=is%3Aopen+is%3Aissue+label%3AnodeNetwork
>>>>> that one in particular definitely needs a rewrite.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jul 15, 2020 at 9:15 AM Ted Kernan <ted at subsurface.io> wrote:
>>>>>
>>>>>> Or are there specific fields I should make sure to index?
>>>>>>
>>>>>> On Wed, Jul 15, 2020 at 9:12 AM Ted Kernan <ted at subsurface.io> wrote:
>>>>>>
>>>>>>> Gracias! Otra pregunta (mas facil en ingles)
>>>>>>>
>>>>>>> After running pgr_nodenetwork I run pgr_createTopology and I get a
>>>>>>> lot of warnings (see screenshot). It also takes a long time.
>>>>>>>
>>>>>>> I end up ignoring all the source = null rows anyways
>>>>>>>
>>>>>>> Is there a filter I can place so that these are not created?
>>>>>>>
>>>>>>> [image: image.png]
>>>>>>>
>>>>>>> On Tue, Jul 14, 2020 at 9:19 PM Vicky Vergara <vicky at georepublic.de>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> El que me diste es euclideano, este sería:
>>>>>>>> https://docs.pgrouting.org/2.6/en/pgr_TSP.html#pgr-tsp
>>>>>>>> Hacer una matriz de costos es usando las funciones como
>>>>>>>> pgr_dijkstraCostMatrix o esta otra que está en este ejemplo
>>>>>>>> https://docs.pgrouting.org/2.6/en/pgr_TSP.html#examples
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Jul 14, 2020 at 9:15 PM Ted Kernan <ted at subsurface.io>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hola Vicky, aprendi mucho y ya estoy jugando bastante bien con
>>>>>>>>> pg_routing
>>>>>>>>>
>>>>>>>>> Una pregunta; veo que en el algoritmo de "traveling sales person"
>>>>>>>>> no hay un input para cost. Se asume que cada edge tiene el mismo costo? O
>>>>>>>>> como se puede definir el costo?
>>>>>>>>>
>>>>>>>>> https://docs.pgrouting.org/2.6/en/pgr_eucledianTSP.html#pgr-euclediantsp
>>>>>>>>>
>>>>>>>>> Gracias!
>>>>>>>>>
>>>>>>>>> Ted
>>>>>>>>>
>>>>>>>>> On Mon, Jul 13, 2020 at 1:29 PM Vicky Vergara <
>>>>>>>>> vicky at georepublic.de> wrote:
>>>>>>>>>
>>>>>>>>>> Sobre todo cuando te atores.
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 13, 2020 at 11:26 AM Ted Kernan <ted at subsurface.io>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Vicky, thank you again so much for your help today!!
>>>>>>>>>>>
>>>>>>>>>>> I will let you know about my progress (if you are interested)
>>>>>>>>>>>
>>>>>>>>>>> Best
>>>>>>>>>>>
>>>>>>>>>>> Ted
>>>>>>>>>>>
>>>>>>>>>>> On Sat, Jul 11, 2020 at 11:09 AM Ted Kernan <ted at subsurface.io>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Vicky,
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you for your email
>>>>>>>>>>>>
>>>>>>>>>>>> I would like to meet on Monday, I’ll put it on my calendar.
>>>>>>>>>>>>
>>>>>>>>>>>> I actually got the function to work, I had to change the
>>>>>>>>>>>> directional flag to false (I was using the default). I still have some
>>>>>>>>>>>> other questions I’d be happy to share with your students and get me running
>>>>>>>>>>>> faster.
>>>>>>>>>>>>
>>>>>>>>>>>> I’ll see you on Monday!
>>>>>>>>>>>>
>>>>>>>>>>>> Ted
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Jul 10, 2020 at 8:38 PM Vicky Vergara <
>>>>>>>>>>>> vicky at georepublic.de> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hello Ted
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am mentoring some students. For me it would be interesting
>>>>>>>>>>>>> to have them involved.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Monday or Tuesday 9am we can meet initially in our chat:
>>>>>>>>>>>>> https://gitter.im/pgRouting/pgrouting
>>>>>>>>>>>>> And from there we move to our video conference
>>>>>>>>>>>>> https://meet.jit.si/pgrouting
>>>>>>>>>>>>>
>>>>>>>>>>>>> For better assistance, we need to be able to duplicate your
>>>>>>>>>>>>> problem, therefore we will need:
>>>>>>>>>>>>> - If you got your data from OSM Then the bounding box that
>>>>>>>>>>>>> contains your problematic area. (something that looks like
>>>>>>>>>>>>> https://workshop.pgrouting.org/2.6/en/chapters/prepare_data.html#option-3-download-using-overpass-xapi)
>>>>>>>>>>>>> and the configuration file you used to import it to the database.
>>>>>>>>>>>>> - otherwise a dump of the edges table with the relevant
>>>>>>>>>>>>> columns would be sufficient.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Please let me know the best day for you so that I can announce
>>>>>>>>>>>>> the meeting.
>>>>>>>>>>>>> Note that I will announce it as a practice "Support on
>>>>>>>>>>>>> pgRouting".
>>>>>>>>>>>>>
>>>>>>>>>>>>> Regards
>>>>>>>>>>>>> VIcky
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Jul 10, 2020 at 7:37 PM Ted Kernan <ted at subsurface.io>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hello Vicky,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I found your email on a PG Routing presentation. There is so
>>>>>>>>>>>>>> little information out there!
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I am having a lot of difficulty with the pgr_dijkstra
>>>>>>>>>>>>>> function. It works sometimes, but I have no idea why it doesn't work other
>>>>>>>>>>>>>> times. I am looking at the nodes and edges on QGIS and there is no reason
>>>>>>>>>>>>>> that the algorithm should come back blank.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Do you have any time this coming week for a quick call? I am
>>>>>>>>>>>>>> in Houston, so I can talk your evening/my morning.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I'd really appreciate it!
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Ted
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Ted Kernan
>>>>>>>>>>>>>> CEO, Geologist, and Chief Architect
>>>>>>>>>>>>>> Mobile: 607-267-2702
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>>> Georepublic UG (haftungsbeschränkt)Salzmannstraße 44,
>>>>>>>>>>>>> 81739 München, Germany <https://www.google.com/maps/search/Salzmannstra%C3%9Fe+44,+%0D%0A81739+M%C3%BCnchen,+Germany?entry=gmail&source=g>
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>> Ted Kernan
>>>>>>>>>>>> CEO, Geologist, and Chief Architect
>>>>>>>>>>>> Mobile: 607-267-2702
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Ted Kernan
>>>>>>>>>>> CEO, Geologist, and Chief Architect
>>>>>>>>>>> Mobile: 607-267-2702
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Ted Kernan
>>>>>>>>> CEO, Geologist, and Chief Architect
>>>>>>>>> Mobile: 607-267-2702
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Ted Kernan
>>>>>>> CEO, Geologist, and Chief Architect
>>>>>>> Mobile: 607-267-2702
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ted Kernan
>>>>>> CEO, Geologist, and Chief Architect
>>>>>> Mobile: 607-267-2702
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Ted Kernan
>>>> CEO, Geologist, and Chief Architect
>>>> Mobile: 607-267-2702
>>>>
>>> --
>>> Ted Kernan
>>> CEO, Geologist, and Chief Architect
>>> Mobile: 607-267-2702
>>>
>>
>>
>> --
>>
>> 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
>>
>>
>>
>
> --
> Ted Kernan
> CEO, Geologist, and Chief Architect
> Mobile: 607-267-2702
>


-- 

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-dev/attachments/20210330/3222823c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 196309 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20210330/3222823c/attachment-0001.png>


More information about the pgrouting-dev mailing list