Search in sources :

Example 1 with Bintree

use of com.revolsys.geometry.index.bintree.Bintree in project com.revolsys.open by revolsys.

the class MCPointInRing method buildIndex.

private void buildIndex() {
    // BoundingBox env = ring.getEnvelopeInternal();
    this.tree = new Bintree();
    final LineString points = this.ring.removeDuplicatePoints();
    final List<MonotoneChain> mcList = MonotoneChainBuilder.getChains(points);
    for (int i = 0; i < mcList.size(); i++) {
        final MonotoneChain mc = mcList.get(i);
        final BoundingBox mcEnv = mc.getEnvelope();
        this.interval.min = mcEnv.getMinY();
        this.interval.max = mcEnv.getMaxY();
        this.tree.insert(this.interval, mc);
    }
}
Also used : LineString(com.revolsys.geometry.model.LineString) MonotoneChain(com.revolsys.geometry.index.chain.MonotoneChain) BoundingBox(com.revolsys.geometry.model.BoundingBox) Bintree(com.revolsys.geometry.index.bintree.Bintree) Point(com.revolsys.geometry.model.Point)

Aggregations

Bintree (com.revolsys.geometry.index.bintree.Bintree)1 MonotoneChain (com.revolsys.geometry.index.chain.MonotoneChain)1 BoundingBox (com.revolsys.geometry.model.BoundingBox)1 LineString (com.revolsys.geometry.model.LineString)1 Point (com.revolsys.geometry.model.Point)1