public class BroadcastedSpatialPartitioner extends SpatialPartitioner
grids, gridType
Constructor and Description |
---|
BroadcastedSpatialPartitioner(org.apache.spark.broadcast.Broadcast<SpatialPartitioner> partitioner) |
Modifier and Type | Method and Description |
---|---|
DedupParams |
getDedupParams() |
List<org.locationtech.jts.geom.Envelope> |
getGrids() |
int |
numPartitions() |
<T extends org.locationtech.jts.geom.Geometry> |
placeObject(T spatialObject)
Given a geometry, returns a list of partitions it overlaps.
|
getGridType, getPartition
public BroadcastedSpatialPartitioner(org.apache.spark.broadcast.Broadcast<SpatialPartitioner> partitioner)
public <T extends org.locationtech.jts.geom.Geometry> Iterator<scala.Tuple2<Integer,T>> placeObject(T spatialObject) throws Exception
SpatialPartitioner
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.
placeObject
in class SpatialPartitioner
Exception
@Nullable public DedupParams getDedupParams()
getDedupParams
in class SpatialPartitioner
public List<org.locationtech.jts.geom.Envelope> getGrids()
getGrids
in class SpatialPartitioner
public int numPartitions()
numPartitions
in class org.apache.spark.Partitioner
Copyright © 2025 The Apache Software Foundation. All rights reserved.