com.vividsolutions.jts.index.bintree
Class Bintree
java.lang.Object
com.vividsolutions.jts.index.bintree.Bintree
public class Bintree
extends java.lang.Object
An
BinTree
(or "Binary Interval Tree")
is a 1-dimensional version of a quadtree.
It indexes 1-dimensional intervals (which of course may
be the projection of 2-D objects on an axis).
It supports range searching
(where the range may be a single point).
This implementation does not require specifying the extent of the inserted
items beforehand. It will automatically expand to accomodate any extent
of dataset.
This index is different to the Interval Tree of Edelsbrunner
or the Segment Tree of Bentley.
ensureExtent
public static Interval ensureExtent(Interval itemInterval,
double minExtent)
Ensure that the Interval for the inserted item has non-zero extents.
Use the current minExtent to pad it, if necessary
insert
public void insert(Interval itemInterval,
Object item)
iterator
public Iterator iterator()
nodeSize
public int nodeSize()
Compute the total number of nodes in the tree
- the number of nodes in the tree
query
public List query(Interval interval)
min and max may be the same value
query
public void query(Interval interval,
Collection foundItems)
query
public List query(double x)