public abstract class SpatialPartitioner extends org.apache.spark.Partitioner implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
protected List<org.locationtech.jts.geom.Envelope> | 
grids  | 
protected GridType | 
gridType  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
SpatialPartitioner(GridType gridType,
                  List<org.locationtech.jts.geom.Envelope> grids)  | 
| Modifier and Type | Method and 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> | 
placeObject(T spatialObject)
Given a geometry, returns a list of partitions it overlaps. 
 | 
protected final GridType gridType
protected final List<org.locationtech.jts.geom.Envelope> grids
public abstract <T extends org.locationtech.jts.geom.Geometry> Iterator<scala.Tuple2<Integer,T>> placeObject(T spatialObject) throws Exception
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.
Exception@Nullable public abstract DedupParams getDedupParams()
public GridType getGridType()
public List<org.locationtech.jts.geom.Envelope> getGrids()
public int getPartition(Object key)
getPartition in class org.apache.spark.PartitionerCopyright © 2023 The Apache Software Foundation. All rights reserved.