Class IndexedGridPartitioner
- java.lang.Object
- 
- org.apache.spark.Partitioner
- 
- org.apache.sedona.core.spatialPartitioning.SpatialPartitioner
- 
- org.apache.sedona.core.spatialPartitioning.FlatGridPartitioner
- 
- org.apache.sedona.core.spatialPartitioning.IndexedGridPartitioner
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- scala.Serializable
 
 public class IndexedGridPartitioner extends FlatGridPartitioner The IndexedGridPartitioner is used when there is already a set of grids which the data should be partitioned into. It leverages an STRTree to quickly find the grids to place a geometry into. If you have very few objects to place, it may make more sense to use the FlatGridPartitioner. If you do not have a strict requirement to use a specific set of grids, it may make more sense to use another partitioner that generates its own grids from space-partitioning tree, e.g. the KDBTreePartitioner or the QuadTreePartitioner.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.sedona.core.spatialPartitioning.FlatGridPartitionerpreserveUncontainedGeometries
 - 
Fields inherited from class org.apache.sedona.core.spatialPartitioning.SpatialPartitionergrids, gridType
 
- 
 - 
Constructor SummaryConstructors Constructor Description IndexedGridPartitioner(List<org.locationtech.jts.geom.Envelope> grids)IndexedGridPartitioner(List<org.locationtech.jts.geom.Envelope> grids, Boolean preserveUncontainedGeometries)IndexedGridPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids)IndexedGridPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids, Boolean preserveUncontainedGeometries)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.index.strtree.STRtreegetIndex()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.- 
Methods inherited from class org.apache.sedona.core.spatialPartitioning.FlatGridPartitionerequals, getDedupParams, numPartitions
 - 
Methods inherited from class org.apache.sedona.core.spatialPartitioning.SpatialPartitionergetGrids, getGridType, getPartition
 
- 
 
- 
- 
- 
Constructor Detail- 
IndexedGridPartitionerpublic IndexedGridPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids, Boolean preserveUncontainedGeometries) 
 - 
IndexedGridPartitionerpublic IndexedGridPartitioner(GridType gridType, List<org.locationtech.jts.geom.Envelope> grids) 
 - 
IndexedGridPartitionerpublic IndexedGridPartitioner(List<org.locationtech.jts.geom.Envelope> grids, Boolean preserveUncontainedGeometries) 
 - 
IndexedGridPartitionerpublic IndexedGridPartitioner(List<org.locationtech.jts.geom.Envelope> grids) 
 
- 
 - 
Method Detail- 
getIndexpublic org.locationtech.jts.index.strtree.STRtree getIndex() 
 - 
placeObjectpublic Iterator<scala.Tuple2<Integer,org.locationtech.jts.geom.Geometry>> placeObject(org.locationtech.jts.geom.Geometry spatialObject) throws Exception Description copied from class:SpatialPartitionerGiven 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. - Overrides:
- placeObjectin class- FlatGridPartitioner
- Throws:
- Exception
 
 
- 
 
-