Class KDB
- java.lang.Object
-
- org.apache.sedona.core.spatialPartitioning.PartitioningUtils
-
- org.apache.sedona.core.spatialPartitioning.KDB
-
- All Implemented Interfaces:
Serializable
public class KDB extends PartitioningUtils implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
KDB.Visitor
-
Constructor Summary
Constructors Constructor Description KDB(int maxItemsPerNode, int maxLevels, org.locationtech.jts.geom.Envelope extent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignLeafIds()
void
dropElements()
List<org.locationtech.jts.geom.Envelope>
fetchLeafZones()
List<KDB>
findLeafNodes(org.locationtech.jts.geom.Envelope envelope)
org.locationtech.jts.geom.Envelope
getExtent()
int
getItemCount()
Set<Integer>
getKeys(org.locationtech.jts.geom.Geometry geometry)
int
getLeafId()
void
insert(org.locationtech.jts.geom.Envelope envelope)
boolean
isLeaf()
Iterator<scala.Tuple2<Integer,org.locationtech.jts.geom.Geometry>>
placeObject(org.locationtech.jts.geom.Geometry geometry)
void
traverse(KDB.Visitor visitor)
Traverses the tree top-down breadth-first and calls the visitor for each node.-
Methods inherited from class org.apache.sedona.core.spatialPartitioning.PartitioningUtils
getPartitioner, getPartitioner
-
-
-
-
Method Detail
-
getItemCount
public int getItemCount()
-
isLeaf
public boolean isLeaf()
-
getLeafId
public int getLeafId()
-
getExtent
public org.locationtech.jts.geom.Envelope getExtent()
-
insert
public void insert(org.locationtech.jts.geom.Envelope envelope)
-
dropElements
public void dropElements()
-
traverse
public void traverse(KDB.Visitor visitor)
Traverses the tree top-down breadth-first and calls the visitor for each node. Stops traversing if a call to Visitor.visit returns false.
-
assignLeafIds
public void assignLeafIds()
-
placeObject
public Iterator<scala.Tuple2<Integer,org.locationtech.jts.geom.Geometry>> placeObject(org.locationtech.jts.geom.Geometry geometry)
- Specified by:
placeObject
in classPartitioningUtils
-
getKeys
public Set<Integer> getKeys(org.locationtech.jts.geom.Geometry geometry)
- Specified by:
getKeys
in classPartitioningUtils
-
fetchLeafZones
public List<org.locationtech.jts.geom.Envelope> fetchLeafZones()
- Specified by:
fetchLeafZones
in classPartitioningUtils
-
-