Class SpatialPartition


  • public class SpatialPartition
    extends java.lang.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
    • Method Detail

      • 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