Do you just need to serialize the tree (and all its contents), or do you
need to maintain and access the tree on disk? I think these two things
require very different designs.
Serializing should be easy - just make everything Serializable. (And
let me know if it works and what the patch is).
Although then I have to ask - why not just rebuild the tree as you read
in the underlying data? Does it really take that long?
Hmm... and the STRtree has two phases of construction, the build phase
and the indexed phase. You'll have to think about whether you persist
both phases, or whether you force an index build before serializing.
Martin Tomko wrote:
Hi All,
I am using JTS through Geotools. I am trying to create a spatial index
on my shapefile polygon data, unhomogenously distributed over space
(read only) for a point in polygon type of queries, and I have two
options - either use a qix (that's a quadree, right?) or use
final SpatialIndex index = new STRtree(); using the JTS
functionalities.
I like the second option, but am wondering how I could save the
results of the indexing for future use. In other words, I need to
introduce persistence.
Alternatively, I guess I could just generate a qix index and use that,
but I wanted to try the STRtree, as I think it is better suited for my
data.
Cheers
Martin
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel