[pgrouting-users] Build the "right" direction in a network, from a fixed starting point
Vicky Vergara
vicky at georepublic.de
Thu May 17 03:07:12 PDT 2018
So, one thing is the direction of the geometry which is a matter of
postGIS, another is graph logic
for the edge circled green if the geometry is "backwards" that is one
thing, you fix with postGIS,
I dont know your data, but suppose
id = 1, source = A, target = B, cost > 0, reverse_cost = -1 and that vertex
A is not reachable
then "manually" would be:
UPDATE TABLE foo set source = target, target = source WHERE source IS IN
(<set of unreachable vertices>)
On Wed, May 16, 2018 at 5:01 PM, andy <aborruso at gmail.com> wrote:
> Hi Vicky
>
> On Tue, 15 May 2018 at 12:58, Vicky Vergara <vicky at georepublic.de> wrote:
>
>> Maybe you want to see if all vertices are reachable from the starting
>> (red) point.
>> What I would do is a pgr_dijkstra(one to many) and verify which vertices
>> are not reachable and manually change the direction of the ones that are
>> not.
>>
>
> my real network has hundreds of nodes and it's impossible to manually
> change the direction, there could be too many.
>
> Thank you
>
> --
> ___________________
>
> 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
>
> _______________________________________________
> 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/20180517/c5a024ac/attachment.html>
More information about the Pgrouting-users
mailing list