Class SpatialPartitioner
java.lang.Object
org.apache.spark.Partitioner
org.apache.sedona.core.spatialPartitioning.SpatialPartitioner
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BroadcastedSpatialPartitioner,FlatGridPartitioner,GenericUniquePartitioner,KDBTreePartitioner,QuadTreePartitioner
public abstract class SpatialPartitioner
extends org.apache.spark.Partitioner
implements Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSpatialPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids) -
Method Summary
Modifier and TypeMethodDescriptionabstract DedupParamsList<org.locationtech.jts.geom.Envelope>getGrids()intgetPartition(Object key) placeObject(T spatialObject) Given a geometry, returns a list of partitions it overlaps.Methods inherited from class org.apache.spark.Partitioner
defaultPartitioner, numPartitions
-
Field Details
-
gridType
-
grids
-
-
Constructor Details
-
SpatialPartitioner
protected SpatialPartitioner() -
SpatialPartitioner
-
-
Method Details
-
placeObject
public abstract <T extends org.locationtech.jts.geom.Geometry> Iterator<scala.Tuple2<Integer,T>> placeObject(T spatialObject) throws Exception Given a geometry, returns a list of partitions it overlaps.For points, returns exactly one partition as long as grid type is non-overlapping. For other geometry types or for overlapping grid types, may return multiple partitions.
- Throws:
Exception
-
getDedupParams
-
getGridType
-
getGrids
-
getPartition
- Specified by:
getPartitionin classorg.apache.spark.Partitioner
-