Hejhej,
I've come up with a way to remove all features of a datastore... However,
I'm quite sure that there are more efficient ways to do this, getting rid of
this awkward iteration. Maybe someone can enlighten me.
Thanks very much in advance.
Markus
Code, created for shapefiles...
leaffan ha scritto:
Hejhej,
I've come up with a way to remove all features of a datastore... However,
I'm quite sure that there are more efficient ways to do this, getting rid of
this awkward iteration. Maybe someone can enlighten me.
FeatureStore stor = (FeatureStore)
leaffan ha scritto:
Hejhej,
I've come up with a way to remove all features of a datastore... However,
I'm quite sure that there are more efficient ways to do this, getting rid of
this awkward iteration. Maybe someone can enlighten me.
FeatureStore stor = (FeatureStore)
Hi,
After loading a shapefile (ESRI), I created a graph using a
DirectedLineStringGraphGenerator. The creation went fine but when using a
DijkstraShortestPathFinder.getPath() on it, I noticed that there was a
problem because it returned null. Apparently, the linestring graph generator
does not
Hi Chris,
I would have to mock up some data and test it but I dont think the
problem is the method but in the management of the data structure. The
code is modifying the same list it is iterating over... which is
generally not a great idea.
I recommend restructuring the algorithm so that when
I added some debug, and apparently, the LineString intersection is not due
to my algorithm. It happens approximately 12 times in the first loop
iteration, then it does not happen anymore. This was probably due to my
shapefile.
So I chose to ignore the LineString intersections and now my algorithm
I tried to use another Vector as you advised. This way, the size the the
lines Vector is not changing while iterating on it. I'm joining the new code
to this mail.
It is taking quite some time (2-3 minutes) but this time I got an exception:
java.lang.ClassCastException:
Chris wrote:
I added some debug, and apparently, the LineString intersection is not
due to my algorithm. It happens approximately 12 times in the first loop
iteration, then it does not happen anymore. This was probably due to my
shapefile.
So I chose to ignore the LineString intersections