Class SpatialPartitioner
- java.lang.Object
-
- org.apache.spark.Partitioner
-
- org.apache.sedona.core.spatialPartitioning.SpatialPartitioner
-
- All Implemented Interfaces:
Serializable
,scala.Serializable
- Direct Known Subclasses:
BroadcastedSpatialPartitioner
,FlatGridPartitioner
,GenericUniquePartitioner
,KDBTreePartitioner
,QuadTreePartitioner
public abstract class SpatialPartitioner extends org.apache.spark.Partitioner implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SpatialPartitioner()
protected
SpatialPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract DedupParams
getDedupParams()
List<org.locationtech.jts.geom.Envelope>
getGrids()
GridType
getGridType()
int
getPartition(Object key)
abstract <T extends org.locationtech.jts.geom.Geometry>
Iterator<scala.Tuple2<Integer,T>>placeObject(T spatialObject)
Given a geometry, returns a list of partitions it overlaps.
-
-
-
Method Detail
-
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
@Nullable public abstract DedupParams getDedupParams()
-
getGridType
public GridType getGridType()
-
getGrids
public List<org.locationtech.jts.geom.Envelope> getGrids()
-
getPartition
public int getPartition(Object key)
- Specified by:
getPartition
in classorg.apache.spark.Partitioner
-
-