good luck!
--
*************************************
Oleguer Sagarra, "Ula"
"Si a les persones els posaren tants entrebancs com als ordinadors per considerar-los intel�ligents, el 90% de la humanitat seria considerada est�pida." I. Asimov
#: Abans d'imprimir aquest correu electr�nic, pensa b� si �s necessari fer-ho: El medi ambient �s q�esti� de tots. Si l'has d'imprimir, intenta fer-ho a doble full o re-escalant-lo a dos fulls per p�gina.
*************************************
On 13/02/12 18:57, mbl wrote:
> How can I include turn penalties for a street network?
> I read in a shapefile for the street network. I would like the
> shortest path algorithm to include a penalty (weight) for a right turn
> or left turn.
> I have the x-y coordinates for the ends of the edges. So I should be
> able to calculate the angle between edges. Maybe I can add a new edge
> to represent every possible turn at the node and assign the angle as
> the weight?
>
You can alternatively set nodes as streets and edges as intersections.
Any two streets connected by an intersection are connected via an edge
with the weight you want (angle, mean traffic at peak hour.. whatever).
I think this simple transformation would make many problems easier to
treat.. but it's just an idea...good luck!
--
*************************************
Oleguer Sagarra, "Ula"
"Si a les persones els posaren tants entrebancs com als ordinadors per considerar-los intel�ligents, el 90% de la humanitat seria considerada est�pida." I. Asimov
#: Abans d'imprimir aquest correu electr�nic, pensa b� si �s necessari fer-ho: El medi ambient �s q�esti� de tots. Si l'has d'imprimir, intenta fer-ho a doble full o re-escalant-lo a dos fulls per p�gina.
*************************************