Class SpatialPartition

java.lang.Object
org.locationtech.jts.operation.union.SpatialPartition

public class SpatialPartition extends Object
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
  • Constructor Details

  • 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 index
      i - the item index
      Returns:
      the item in the partition
    • getGeometry

      public Geometry getGeometry(int s, int i)
      Gets a geometry in a given partition
      Parameters:
      s - the partition index
      i - the item index
      Returns:
      the geometry for the given partition and item index