I am using a shapefile downloaded from OpenStreetMap in order to calculate
a route between two points. The graph created contains some isolated arcs
that are messing up my routing like these ones
http://screencast.com/t/4jnQFx57
Is there any way i can remove them in a fast way, before or after the graph
creation?
The way i am implementing the project is creating a List of linestrings
read from the shapefile and then iterating through the list and adding each
linestring to the graph. I did find a solution but it is not an optimal one
since it takes more than 1 hour to get results.
My solution looks to count the number of occurrences of the first and he
last point of a linestring in the other linestrings and if one of the
nOccurrences is >1 the linestring will get added to the graph.
Basically i will have to iterate twice through the list, but since the list
has more than 70000 linestrings it will do a O(n*n) program which will take
forever and i need to get results in ms not in hours.
Is there other way that i can do this?
<http://screencast.com/t/4jnQFx57>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users