Class SpatialPartition
java.lang.Object
org.locationtech.jts.operation.union.SpatialPartition
Computes a partition of a set of geometries into disjoint subsets,
based on a provided equivalence
SpatialPartition.EquivalenceRelation.
Uses a spatial index for efficient processing.- Author:
- mdavis
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn interface for a function to compute an equivalence relation. -
Constructor Summary
ConstructorsConstructorDescriptionSpatialPartition(Geometry[] geoms, SpatialPartition.EquivalenceRelation rel) -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()Gets the number of partitionsgetGeometry(int s, int i) Gets a geometry in a given partitionintgetItem(int s, int i) Gets the index of a geometry in a partitionintgetSize(int s) Gets the number of geometries in a given partition.
-
Constructor Details
-
SpatialPartition
-
-
Method Details
-
getCount
public int getCount()Gets the number of partitions- Returns:
- the number of partitions
-
getSize
public int getSize(int s) Gets the number of geometries in a given partition.- Parameters:
s- the partition index- Returns:
- the size of the partition
-
getItem
public int getItem(int s, int i) Gets the index of a geometry in a partition- Parameters:
s- the partition indexi- the item index- Returns:
- the item in the partition
-
getGeometry
Gets a geometry in a given partition- Parameters:
s- the partition indexi- the item index- Returns:
- the geometry for the given partition and item index
-