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);
}
}
Aggregations