Package org.anchoranalysis.spatial.rtree
Class SpatiallySeparate<T>
Object
org.anchoranalysis.spatial.rtree.SpatiallySeparate<T>
- Type Parameters:
T- the element-type in the collection.
public class SpatiallySeparate<T> extends Object
Splits a collection of elements into spatially separate clusters.
Each element must provide a corresponding bounding-box.
Any objects whose bounding-boxes intersect belong to the same cluster, but otherwise not.
This is similar to a simplified DBSCAN algorithm.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description SpatiallySeparate(Function<T,BoundingBox> extractBoundingBox) -
Method Summary
-
Constructor Details
-
Method Details
-
separate
Splits a collection of elements into spatially separate clusters, without consuming all elements inelements.- Parameters:
elements- the collection of elements to separate.- Returns:
- a list of object-collections, each object-collection is guaranteed to be spatially separate from the others.
-