[pgrouting-users] shootingstar_sp_smart and linsestrinct direction

Daniel Kastl daniel at georepublic.de
Thu Jun 23 10:58:52 EDT 2011


Hi Frederic,

I think this is the case in other wrapper functions as well, because
Shooting Star core returns a list of road links and the wrapper(s) just
modify the output to return the geometry column, for example to draw the
line.
This geometry is the one of your data and how the data was digitized. And
some attributes may be different depending on the direction, best example
are one way streets.

So it's a good question if the wrapper should care about this and flip the
linestring, or if this should be up to the application to check for the
right order of start and end of each road link. Because there might be
direction dependent attributes that we don't know about and might go beyond
a general function.

At the moment you have to care about this. But we can talk about if it
should be done by pgRouting in the future. Maybe you can extend
the shootingstar_sp_smart function to do it right.

Just as a side note, the first and last edge are added and don't exist in
the network. So they are in the right direction because of that. Since the
links don't really exist, they have no attributes either.

Daniel


2011/6/23 Frederic Junod <frederic.junod at camptocamp.com>

> Hello,
>
> I'm using the shootingstar_sp_smart function from
> https://github.com/pgRouting/pgrouting-contrib/ and I'm having an
> issue with the "direction" of the result.
>
> For example, the result of a query (from x to y) is:
>  x ---- a ---- b ---- c ---- y
>
> The function return something like:
> MULTILINESTRING((x, a))
> MULTILINESTRING((b, a))
> MULTILINESTRING((c, b))
> MULTILINESTRING((c, y))
>
> The first and last line are ok but the two other are reversed.
> Is my network ok ?
>
> Regards,
> fredj
>
> --
> Frédéric Junod
> Camptocamp SA
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20110623/08cc56b3/attachment.html


More information about the Pgrouting-users mailing list