[pgrouting-users] pgr_withPoints not working correctly

Vicky Vergara vicky at georepublic.de
Thu Apr 14 23:35:54 PDT 2016


Josep:
This is what is expected:

 SELECT * FROM pgr_withPoints(
        'SELECT id, source, target, cost, reverse_cost FROM edge_table
ORDER BY id',
        'SELECT pid, edge_id, fraction, side from pointsOfInterest',
        -1, -3);
 seq | path_seq | node | edge | cost | agg_cost
-----+----------+------+------+------+----------
   1 |        1 |   -1 |    1 |  0.6 |        0
   2 |        2 |    2 |    4 |    1 |      0.6
   3 |        3 |    5 |   10 |    1 |      1.6
   4 |        4 |   10 |   12 |  0.6 |      2.6
   5 |        5 |   -3 |   -1 |    0 |      3.2
(5 rows)


Vicky
PD. I need the issue open so that I can commit the fix against the issue.
Another PD. we are in the final release details for 2.2
(message hasn't being sent but its being already tagged so the fix will be
on a micro release)



On Fri, Apr 15, 2016 at 12:43 AM, Vicky Vergara <vicky at georepublic.de>
wrote:

>  Josep:
> Your explanation is very clear, thanks for testing.
> Please open an issue with this bug. (while I start working on it)
> https://github.com/pgRouting/pgrouting/issues
> Just for your information: one of the reasons that the new functionality
> is placed as proposed functions because of bugs that might still be there.
> Thanks again for trying it out.
> Vicky
>
>
>
>
>
>
>
> On Thu, Apr 14, 2016 at 1:03 PM, Josep Lopez Xarbau <
> jlopez at tecnocampus.cat> wrote:
>
>> Hi, I’ve tried this function and it seems not to work correctly. When it
>> calculates the route between vertex it does well, but when using the
>> pointsofinterest, it confuses the ids of the points and the result is
>> incorrect.
>>
>> If we take a look at the example:
>>
>>
>>
>> *Example:*
>>
>> From point 1 to point 3
>>
>> SELECT * FROM pgr_withPoints(
>>
>>         'SELECT id, source, target, cost, reverse_cost FROM edge_table
>> ORDER BY id',
>>
>>         'SELECT pid, edge_id, fraction, side from pointsOfInterest',
>>
>>         -1, -3);
>>
>> seq | path_seq | node | edge | cost | agg_cost
>>
>> -----+----------+------+------+------+----------
>>
>>    1 |        1 |   -1 |    1 |  0.6 |        0
>>
>>    2 |        2 |    2 |    4 |    1 |      0.6
>>
>>    3 |        3 |    5 |    7 |    1 |      1.6
>>
>>    4 |        4 |    8 |    6 |  0.7 |      2.6
>>
>>    5 |        5 |   -3 |   -1 |    0 |      3.3
>>
>> (5 rows)
>>
>> If we follow the edges, we’ll see that it begins from the point 1 but
>> ends at point 4. Edges sequence(1,4,7,6)
>>
>> [image: ../../../_images/Fig1-originalData.png]
>>
>>
>>
>> These are the correspondences of the points
>>
>>
>>
>> Point of ‘Pointsofinterest’          Point used by pgr_withpoints
>>
>> 1
>> 1
>>
>> 2
>> 5
>>
>> 3
>> 4
>>
>> 4
>> 2
>>
>> 5
>> 3
>>
>> 6
>> 6
>>
>> Hope I explained myself clearly, and sorry for my English (;P).
>>
>>
>>
>> Josep.
>> ------------------------------
>>
>> *CONFIDENCIALITAT*
>> Aquesta informació és confidencial, personal i intransferible i només va
>> dirigida a la/les adreça/ces indicades. Qualsevol modificació,
>> retransmissió, difusió o altre ús d'aquesta informació per persones o
>> entitats diferents a la persona a qui va dirigida està prohibida. Si vostè
>> l'ha rebut per error, li preguem que ho reenviï a *desconegut at tecnocampus.cat
>> <desconegut at tecnocampus.com>*, i esborri el missatge original juntament
>> amb els seus fitxers annexos sense llegir-lo ni gravar-lo. Gràcies.
>> Abans d'imprimir-lo, assegura't de que és realment necessari.
>> *EL MEDI AMBIENT ÉS COSA DE TOTS.*
>>
>>
>> *CONFIDENCIALIDAD *La presente información es confidencial, personal e
>> intransferible y sólo va dirigida a la/s dirección/es indicadas.
>> Cualquier modificación, retransmisión, difusión u otro uso de esta
>> información por personas o entidades diferentes a la persona a la que va
>> dirigida está prohibida. Si usted lo ha recibido por error, le rogamos
>> que lo reenvie a desconegut at tecnocampus.com, y borre el mensaje original
>> junto con sus ficheros anexos sin leerlo ni grabarlo. Gracias.
>> Antes de imprimir, asegúrese que es realmente necesario hacerlo.
>> *EL MEDIO AMBIENTE ES COSA DE TODOS.*
>>
>>
>>
>> _______________________________________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.osgeo.org
>> http://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
>
>
>


-- 

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/20160415/48c7c038/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 88031 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20160415/48c7c038/attachment-0001.png>


More information about the Pgrouting-users mailing list