Not sure if your argument is with your data or with geotools?
http://docs.geotools.org/latest/userguide/extension/graph/index.html#graphbuilder
In the above reference page you can see there are several builders, you can
use a builder that does not care about direction and thus have a graph that
is easier to navigate).
Many datasets are constructed for a visual (so the direction of the lines
is kind of random based on how they were drawn or collected). Be sure your
dataset is intended for navigation before trying to use "direction". You
may also find that the lifework does not quite meet up
Note udig has a couple of renderers that can be used to make working with
graphs easier, you can port this to the geotools direct layer interfere if
you want to "see" your graph and/or the direction of each line string.
Jody Garnett
On Tue, May 6, 2014 at 3:03 AM, Elena Pop <elena0...@gmail.com> wrote:
> Hello,
>
> I have been running some tests with the Dijkstra algorithm on a graph
> generated from a shapefile and i have some questions.
> Lets say i want to find the path between these points
> http://screencast.com/t/HZ8p06yYjTV the source is the left point and the
> destination is the right point. Apparently using Dijkstra the path returned
> is null.
> After digging a little bit i found out that there is no edge that would
> start from the destination and would go towards the source. The only one
> is pointed in this screenshot
> http://screencast.com/t/8CqbyRxRDtck(yellow->blue points) which obviously is
> not an optimal solution to the
> path finding.
> So my destination point is placed on an edge like the one presented
> between the red points http://screencast.com/t/zFjhy3BV and there is no
> path that can be built since there are no propper edges starting from
> there: http://screencast.com/t/tSKl79B6P4KF .
>
> Is there any way i can create edges between each intersection points of
> the lines from the shapefile?
> Hope it makes sense and looking forward to your answer.
>
>
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find
> out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users