Search in sources :

Example 1 with LineSegmentIntersectionVisitor

use of com.revolsys.geometry.index.visitor.LineSegmentIntersectionVisitor in project com.revolsys.open by revolsys.

the class LineSegmentIndex method queryIntersections.

public List<Geometry> queryIntersections(final LineSegment querySeg) {
    final BoundingBox env = querySeg.getBoundingBox();
    final LineSegmentIntersectionVisitor visitor = new LineSegmentIntersectionVisitor(querySeg);
    forEach(env, visitor);
    final List<Geometry> intersections = new ArrayList<>(visitor.getIntersections());
    return intersections;
}
Also used : LineSegmentIntersectionVisitor(com.revolsys.geometry.index.visitor.LineSegmentIntersectionVisitor) Geometry(com.revolsys.geometry.model.Geometry) BoundingBox(com.revolsys.geometry.model.BoundingBox) ArrayList(java.util.ArrayList)

Aggregations

LineSegmentIntersectionVisitor (com.revolsys.geometry.index.visitor.LineSegmentIntersectionVisitor)1 BoundingBox (com.revolsys.geometry.model.BoundingBox)1 Geometry (com.revolsys.geometry.model.Geometry)1 ArrayList (java.util.ArrayList)1