public class FlatGridPartitioner extends SpatialPartitioner
grids, gridType| Constructor and Description |
|---|
FlatGridPartitioner(GridType gridType,
List<org.locationtech.jts.geom.Envelope> grids) |
FlatGridPartitioner(List<org.locationtech.jts.geom.Envelope> grids) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
DedupParams |
getDedupParams() |
int |
numPartitions() |
Iterator<scala.Tuple2<Integer,org.locationtech.jts.geom.Geometry>> |
placeObject(org.locationtech.jts.geom.Geometry spatialObject)
Given a geometry, returns a list of partitions it overlaps.
|
getGrids, getGridType, getPartitionpublic FlatGridPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids)
public FlatGridPartitioner(List<org.locationtech.jts.geom.Envelope> grids)
public Iterator<scala.Tuple2<Integer,org.locationtech.jts.geom.Geometry>> placeObject(org.locationtech.jts.geom.Geometry spatialObject) throws Exception
SpatialPartitionerFor 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 SpatialPartitionerException@Nullable public DedupParams getDedupParams()
getDedupParams in class SpatialPartitionerpublic int numPartitions()
numPartitions in class org.apache.spark.PartitionerCopyright © 2023 The Apache Software Foundation. All rights reserved.