Packages

c

org.apache.sedona.core.joinJudgement

KnnJoinIndexJudgement

class KnnJoinIndexJudgement[T <: Geometry, U <: Geometry] extends JudgementBase[T, U] with FlatMapFunction2[Iterator[T], Iterator[U], Pair[T, U]] with Serializable

This class is responsible for performing a K-nearest neighbors (KNN) join operation using a spatial index. It extends the JudgementBase class and implements the FlatMapFunction2 interface.

Linear Supertypes
FlatMapFunction2[Iterator[T], Iterator[U], Pair[T, U]], JudgementBase[T, U], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KnnJoinIndexJudgement
  2. FlatMapFunction2
  3. JudgementBase
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KnnJoinIndexJudgement(k: Int, distanceMetric: DistanceMetric, includeTies: Boolean, broadcastQueryObjects: Broadcast[List[T]], broadcastObjectsTreeIndex: Broadcast[STRtree], buildCount: LongAccumulator, streamCount: LongAccumulator, resultCount: LongAccumulator, candidateCount: LongAccumulator)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def call(queryShapes: Iterator[T], objectShapes: Iterator[U]): Iterator[Pair[T, U]]

    This method performs the KNN join operation.

    This method performs the KNN join operation. It iterates over the geometries in the stream side and uses the spatial index to find the k nearest neighbors for each geometry. The method returns an iterator over the join results.

    queryShapes

    iterator over the geometries in the query side

    objectShapes

    iterator over the geometries in the object side

    returns

    an iterator over the join results

    Definition Classes
    KnnJoinIndexJudgement → FlatMapFunction2
    Annotations
    @Override()
    Exceptions thrown

    Exception if the spatial index is not of type STRtree

  6. def callUsingBroadcastObjectIndex(queryShapes: Iterator[T]): Iterator[Pair[T, U]]

    This method performs the KNN join operation using the broadcast spatial index built using all geometries in the object side.

    This method performs the KNN join operation using the broadcast spatial index built using all geometries in the object side.

    queryShapes

    iterator over the geometries in the query side

    returns

    an iterator over the join results

  7. def callUsingBroadcastQueryList(objectShapes: Iterator[U]): Iterator[Pair[T, U]]

    This method performs the KNN join operation using the broadcast query geometries.

    This method performs the KNN join operation using the broadcast query geometries.

    objectShapes

    iterator over the geometries in the object side

    returns

    an iterator over the join results

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hasNextBase(buildShapes: List[_ <: Geometry], streamShapes: Iterator[_ <: Geometry]): Boolean

    Iterator model for the nest loop join.

    Iterator model for the nest loop join. It checks if there is a next match and populate it to the result.

    Attributes
    protected[joinJudgement]
    Definition Classes
    JudgementBase
  14. def hasNextBase(spatialIndex: SpatialIndex, streamShapes: Iterator[_ <: Geometry], buildLeft: Boolean): Boolean

    Iterator model for the index-based join.

    Iterator model for the index-based join. It checks if there is a next match and populate it to the result.

    Attributes
    protected[joinJudgement]
    Definition Classes
    JudgementBase
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def initPartition(): Unit

    Looks up the extent of the current partition.

    Looks up the extent of the current partition. If found, match method will activate the logic to avoid emitting duplicate join results from multiple partitions.

    Must be called before processing a partition. Must be called from the same instance that will be used to process the partition.

    Attributes
    protected[joinJudgement]
    Definition Classes
    JudgementBase
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def log(message: String, params: <repeated...>[AnyRef]): Unit
    Attributes
    protected[joinJudgement]
    Definition Classes
    JudgementBase
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def nextBase(buildShapes: List[_ <: Geometry], streamShapes: Iterator[_ <: Geometry]): Pair[U, T]

    Iterator model for the nest loop join.

    Iterator model for the nest loop join. It returns 1 pair in the current batch. Each batch contains a list of pairs of geometries that satisfy the join condition. The current batch is the result of the current stream shape against all the build shapes.

    Attributes
    protected[joinJudgement]
    Definition Classes
    JudgementBase
  21. def nextBase(spatialIndex: SpatialIndex, streamShapes: Iterator[_ <: Geometry], buildLeft: Boolean): Pair[U, T]

    Iterator model for the index-based join.

    Iterator model for the index-based join. It returns 1 pair in the current batch. Each batch contains a list of pairs of geometries that satisfy the join condition. The current batch is the result of the current stream shape against all the build shapes.

    Attributes
    protected[joinJudgement]
    Definition Classes
    JudgementBase
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from FlatMapFunction2[Iterator[T], Iterator[U], Pair[T, U]]

Inherited from JudgementBase[T, U]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped