Class QuadTreeRTPartitioning
java.lang.Object
org.apache.sedona.core.spatialPartitioning.QuadtreePartitioning
org.apache.sedona.core.spatialPartitioning.QuadTreeRTPartitioning
- All Implemented Interfaces:
Serializable
The class is used to build an R-tree over a random sample of another dataset and uses distance
bounds to ensure efficient local kNN joins.
By calculating distance bounds and using circle range queries, it ensures that the subsets Si, containing all necessary points for accurate kNN results. The final union of local join results provides the complete kNN join result for the datasets R and S.
It generates List<List
- See Also:
-
Field Summary
Fields inherited from class org.apache.sedona.core.spatialPartitioning.QuadtreePartitioning
partitionTree -
Constructor Summary
ConstructorsConstructorDescriptionQuadTreeRTPartitioning(List<org.locationtech.jts.geom.Envelope> samples, org.locationtech.jts.geom.Envelope boundary, int partitions) QuadTreeRTPartitioning(List<org.locationtech.jts.geom.Envelope> samples, org.locationtech.jts.geom.Envelope boundary, int partitions, int minTreeLevel) -
Method Summary
Modifier and TypeMethodDescriptionorg.locationtech.jts.index.strtree.STRtreebuildSTRTree(List<org.locationtech.jts.geom.Envelope> samples, int k) This function is used to build the STR tree from the quad-tree built from the samples.getMbrs()org.locationtech.jts.index.strtree.STRtreedoublegetMinimalEnvelopeWidth(List<QuadRectangle> partitionMBRs) This function is used to calculate the minimal envelope width of the partitioned MBRs.voidprocessPartitions(List<QuadRectangle> partitionMBRs, Map<Integer, List<org.locationtech.jts.geom.Envelope>> mbrs, int k, org.locationtech.jts.index.strtree.STRtree sampleTree, org.locationtech.jts.geom.GeometryFactory geometryFactory) Methods inherited from class org.apache.sedona.core.spatialPartitioning.QuadtreePartitioning
getPartitionTree
-
Constructor Details
-
QuadTreeRTPartitioning
public QuadTreeRTPartitioning(List<org.locationtech.jts.geom.Envelope> samples, org.locationtech.jts.geom.Envelope boundary, int partitions) throws Exception - Throws:
Exception
-
QuadTreeRTPartitioning
public QuadTreeRTPartitioning(List<org.locationtech.jts.geom.Envelope> samples, org.locationtech.jts.geom.Envelope boundary, int partitions, int minTreeLevel) throws Exception - Throws:
Exception
-
-
Method Details
-
getMbrs
-
getMbrSpatialIndex
public org.locationtech.jts.index.strtree.STRtree getMbrSpatialIndex() -
buildSTRTree
public org.locationtech.jts.index.strtree.STRtree buildSTRTree(List<org.locationtech.jts.geom.Envelope> samples, int k) This function is used to build the STR tree from the quad-tree built from the samples. It is used to expand the partitioned boundaries.- Parameters:
samples- the samplesk- the number of neighbor samples- Returns:
-
processPartitions
public void processPartitions(List<QuadRectangle> partitionMBRs, Map<Integer, List<org.locationtech.jts.geom.Envelope>> mbrs, int k, org.locationtech.jts.index.strtree.STRtree sampleTree, org.locationtech.jts.geom.GeometryFactory geometryFactory) -
getMinimalEnvelopeWidth
This function is used to calculate the minimal envelope width of the partitioned MBRs.- Parameters:
partitionMBRs-- Returns:
-