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, getPartition
public 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
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 int numPartitions()
numPartitions
in class org.apache.spark.Partitioner
Copyright © 2023 The Apache Software Foundation. All rights reserved.