Class QuadTreeRTPartitioning

java.lang.Object
org.apache.sedona.core.spatialPartitioning.QuadtreePartitioning
org.apache.sedona.core.spatialPartitioning.QuadTreeRTPartitioning
All Implemented Interfaces:
Serializable

public class QuadTreeRTPartitioning extends QuadtreePartitioning
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> expandedPartitionedBoundaries based on the quad tree.

See Also:
  • 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

      public HashMap<Integer,List<org.locationtech.jts.geom.Envelope>> 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 samples
      k - 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

      public double getMinimalEnvelopeWidth(List<QuadRectangle> partitionMBRs)
      This function is used to calculate the minimal envelope width of the partitioned MBRs.
      Parameters:
      partitionMBRs -
      Returns: