public class JoinQuery extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JoinQuery.JoinParams |
Constructor and Description |
---|
JoinQuery() |
Modifier and Type | Method and Description |
---|---|
static <T extends org.locationtech.jts.geom.Geometry> |
distanceJoin(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
JoinQuery.JoinParams joinParams)
Note: INTERNAL FUNCTION.
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQuery(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
boolean useIndex,
boolean considerBoundaryIntersection)
Deprecated.
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQuery(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
boolean useIndex,
SpatialPredicate spatialPredicate)
Inner joins two sets of geometries, where the query windows are circles (aka.
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQuery(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
JoinQuery.JoinParams joinParams) |
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQueryCountByKey(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
boolean useIndex,
boolean considerBoundaryIntersection)
Deprecated.
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQueryCountByKey(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
boolean useIndex,
SpatialPredicate spatialPredicate)
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQueryCountByKey(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
JoinQuery.JoinParams joinParams) |
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQueryFlat(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
boolean useIndex,
boolean considerBoundaryIntersection)
Deprecated.
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQueryFlat(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
boolean useIndex,
SpatialPredicate spatialPredicate)
Inner joins two sets of geometries, where the query windows are circles (aka.
|
static <T extends org.locationtech.jts.geom.Geometry> |
DistanceJoinQueryFlat(SpatialRDD<T> spatialRDD,
CircleRDD queryRDD,
JoinQuery.JoinParams joinParams) |
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
spatialJoin(SpatialRDD<U> leftRDD,
SpatialRDD<T> rightRDD,
JoinQuery.JoinParams joinParams)
Note: INTERNAL FUNCTION.
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQuery(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
boolean useIndex,
boolean considerBoundaryIntersection)
Deprecated.
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQuery(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
boolean useIndex,
SpatialPredicate spatialPredicate)
Inner joins two sets of geometries on specified spatial predicate.
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQuery(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
JoinQuery.JoinParams joinParams) |
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQueryCountByKey(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
boolean useIndex,
boolean considerBoundaryIntersection)
Deprecated.
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQueryCountByKey(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
boolean useIndex,
SpatialPredicate spatialPredicate)
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQueryCountByKey(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
JoinQuery.JoinParams joinParams) |
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQueryFlat(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
boolean useIndex,
boolean considerBoundaryIntersection)
Deprecated.
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQueryFlat(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
boolean useIndex,
SpatialPredicate spatialPredicate)
Inner joins two sets of geometries on specified spatial predicate.
|
static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> |
SpatialJoinQueryFlat(SpatialRDD<T> spatialRDD,
SpatialRDD<U> queryRDD,
JoinQuery.JoinParams joinParams) |
public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,List<T>> SpatialJoinQuery(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, boolean useIndex, SpatialPredicate spatialPredicate) throws Exception
spatialPredicate
is the spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
If useIndex
is false, the join uses nested loop algorithm to identify matching geometries.
If useIndex
is true, the join scans query windows and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicate geometries present in the input queryWindowRDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD, regardless of their non-spatial attributes, will be reflected in the join results.
U
- Type of the geometries in queryWindowRDD setT
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometries which serve as query windowsuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
spatialPredicate
- Spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
Exception
- the exception@Deprecated public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,List<T>> SpatialJoinQuery(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, boolean useIndex, boolean considerBoundaryIntersection) throws Exception
If considerBoundaryIntersection
is true
, returns pairs of geometries
which intersect. Otherwise, returns pairs of geometries where first geometry covers second geometry.
If useIndex
is false, the join uses nested loop algorithm to identify matching geometries.
If useIndex
is true, the join scans query windows and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicate geometries present in the input queryWindowRDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD, regardless of their non-spatial attributes, will be reflected in the join results.
U
- Type of the geometries in queryWindowRDD setT
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometries which serve as query windowsuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
considerBoundaryIntersection
- Join relationship type: 'intersects' if true, 'covers' otherwiseException
- the exceptionpublic static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,List<T>> SpatialJoinQuery(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Exception
public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,T> SpatialJoinQueryFlat(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, boolean useIndex, SpatialPredicate spatialPredicate) throws Exception
spatialPredicate
is the spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
.
If useIndex
is false, the join uses nested loop algorithm to identify matching geometries.
If useIndex
is true, the join scans query windows and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicates present in the input RDDs will be reflected in the join results.
U
- Type of the geometries in queryWindowRDD setT
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometries which serve as query windowsuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
spatialPredicate
- Spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
Exception
- the exception@Deprecated public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,T> SpatialJoinQueryFlat(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, boolean useIndex, boolean considerBoundaryIntersection) throws Exception
If considerBoundaryIntersection
is true
, returns pairs of geometries
which intersect. Otherwise, returns pairs of geometries where first geometry covers second geometry.
If useIndex
is false, the join uses nested loop algorithm to identify matching geometries.
If useIndex
is true, the join scans query windows and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicates present in the input RDDs will be reflected in the join results.
U
- Type of the geometries in queryWindowRDD setT
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometries which serve as query windowsuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
considerBoundaryIntersection
- Join relationship type: 'intersects' if true, 'covers' otherwiseException
- the exceptionpublic static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,T> SpatialJoinQueryFlat(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Exception
public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,Long> SpatialJoinQueryCountByKey(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, boolean useIndex, SpatialPredicate spatialPredicate) throws Exception
SpatialJoinQueryFlat(SpatialRDD, SpatialRDD, boolean, SpatialPredicate)
count by key.
Duplicate geometries present in the input queryWindowRDD RDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD RDD, regardless of their non-spatial attributes, will be reflected in the join results.
U
- Type of the geometries in queryWindowRDD setT
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometries which serve as query windowsuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
spatialPredicate
- Spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
SpatialJoinQueryFlat(SpatialRDD, SpatialRDD, boolean, SpatialPredicate)
, but in this pair RDD, each pair contains a geometry and the count of matching geometriesException
- the exception@Deprecated public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,Long> SpatialJoinQueryCountByKey(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, boolean useIndex, boolean considerBoundaryIntersection) throws Exception
SpatialJoinQueryFlat(SpatialRDD, SpatialRDD, boolean, boolean)
count by key.
Duplicate geometries present in the input queryWindowRDD RDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD RDD, regardless of their non-spatial attributes, will be reflected in the join results.
U
- Type of the geometries in queryWindowRDD setT
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometries which serve as query windowsuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
considerBoundaryIntersection
- Join relationship type: 'intersects' if true, 'covers' otherwiseSpatialJoinQueryFlat(SpatialRDD, SpatialRDD, boolean, boolean)
, but in this pair RDD, each pair contains a geometry and the count of matching geometriesException
- the exceptionpublic static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,Long> SpatialJoinQueryCountByKey(SpatialRDD<T> spatialRDD, SpatialRDD<U> queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Exception
public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,T> DistanceJoinQueryFlat(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, boolean useIndex, SpatialPredicate spatialPredicate) throws Exception
spatialPredicate
is the spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
.
If useIndex
is false, the join uses nested loop algorithm to identify matching circle/geometry.
If useIndex
is true, the join scans circles and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicates present in the input RDDs will be reflected in the join results.
T
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometriesuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
spatialPredicate
- Spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
, should be one of INTERSECTS
and COVERED_BY
Exception
- the exception@Deprecated public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,T> DistanceJoinQueryFlat(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, boolean useIndex, boolean considerBoundaryIntersection) throws Exception
If considerBoundaryIntersection
is true
, returns pairs of circle/geometry
which intersect. Otherwise, returns pairs of geometries where first circle covers second geometry.
If useIndex
is false, the join uses nested loop algorithm to identify matching circle/geometry.
If useIndex
is true, the join scans circles and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicates present in the input RDDs will be reflected in the join results.
T
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometriesuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
considerBoundaryIntersection
- consider boundary intersectionException
- the exceptionpublic static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,T> DistanceJoinQueryFlat(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Exception
public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,List<T>> DistanceJoinQuery(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, boolean useIndex, SpatialPredicate spatialPredicate) throws Exception
spatialPredicate
is the spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
.
If useIndex
is false, the join uses nested loop algorithm to identify matching circle/geometry.
If useIndex
is true, the join scans circles and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicate geometries present in the input CircleRDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD, regardless of their non-spatial attributes, will be reflected in the join results.
T
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometriesuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
spatialPredicate
- Spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
, should be one of INTERSECTS
and COVERED_BY
Exception
- the exception@Deprecated public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,List<T>> DistanceJoinQuery(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, boolean useIndex, boolean considerBoundaryIntersection) throws Exception
If considerBoundaryIntersection
is true
, returns pairs of circle/geometry
which intersect. Otherwise, returns pairs of geometries where first circle covers second geometry.
If useIndex
is false, the join uses nested loop algorithm to identify matching circle/geometry.
If useIndex
is true, the join scans circles and uses an index of geometries
built prior to invoking the join to lookup matches.
Duplicate geometries present in the input CircleRDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD, regardless of their non-spatial attributes, will be reflected in the join results.
T
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometriesuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
considerBoundaryIntersection
- consider boundary intersectionException
- the exceptionpublic static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,List<T>> DistanceJoinQuery(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Exception
public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,Long> DistanceJoinQueryCountByKey(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, boolean useIndex, SpatialPredicate spatialPredicate) throws Exception
DistanceJoinQueryFlat(SpatialRDD, CircleRDD, boolean, boolean)
count by key.
Duplicate geometries present in the input CircleRDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD, regardless of their non-spatial attributes, will be reflected in the join results.
T
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometriesuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
spatialPredicate
- Spatial predicate in join condition spatialRDD <spatialPredicate> queryRDD
, should be one of INTERSECTS
and COVERED_BY
DistanceJoinQueryFlat(SpatialRDD, CircleRDD, boolean, boolean)
, but in this pair RDD, each pair contains a geometry and the count of matching geometriesException
- the exception@Deprecated public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,Long> DistanceJoinQueryCountByKey(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, boolean useIndex, boolean considerBoundaryIntersection) throws Exception
DistanceJoinQueryFlat(SpatialRDD, CircleRDD, boolean, boolean)
count by key.
Duplicate geometries present in the input CircleRDD, regardless of their non-spatial attributes, will not be reflected in the join results. Duplicate geometries present in the input spatialRDD, regardless of their non-spatial attributes, will be reflected in the join results.
T
- Type of the geometries in spatialRDD setspatialRDD
- Set of geometriesqueryRDD
- Set of geometriesuseIndex
- Boolean indicating whether the join should use the index from spatialRDD.indexedRDD
considerBoundaryIntersection
- consider boundary intersectionDistanceJoinQueryFlat(SpatialRDD, CircleRDD, boolean, boolean)
, but in this pair RDD, each pair contains a geometry and the count of matching geometriesException
- the exceptionpublic static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,Long> DistanceJoinQueryCountByKey(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Exception
public static <T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Geometry,T> distanceJoin(SpatialRDD<T> spatialRDD, CircleRDD queryRDD, JoinQuery.JoinParams joinParams) throws Exception
Note: INTERNAL FUNCTION. API COMPATIBILITY IS NOT GUARANTEED. DO NOT USE IF YOU DON'T KNOW WHAT IT IS.
Exception
public static <U extends org.locationtech.jts.geom.Geometry,T extends org.locationtech.jts.geom.Geometry> org.apache.spark.api.java.JavaPairRDD<U,T> spatialJoin(SpatialRDD<U> leftRDD, SpatialRDD<T> rightRDD, JoinQuery.JoinParams joinParams) throws Exception
Note: INTERNAL FUNCTION. API COMPATIBILITY IS NOT GUARANTEED. DO NOT USE IF YOU DON'T KNOW WHAT IT IS.
Exception
Copyright © 2024 The Apache Software Foundation. All rights reserved.