Class AbstractGeometryCollection<P extends Position,​G extends Geometry<P>>

    • Constructor Detail

      • AbstractGeometryCollection

        @SafeVarargs
        public AbstractGeometryCollection​(G... geometries)
        Constructs a GeometryCollection from the specified Geometrys.
        Parameters:
        geometries - the Geometrys that are the elements of the constructed GeometryCollection.
      • AbstractGeometryCollection

        public AbstractGeometryCollection​(CoordinateReferenceSystem<P> crs)
        Constructs an empty GeometryCollection
    • Method Detail

      • getNumGeometries

        public int getNumGeometries()
        Returns the number of elements in this GeometryCollection.
        Specified by:
        getNumGeometries in interface Complex<P extends Position,​G extends Geometry<P>>
        Returns:
        the number of elements of this instance.
      • getComponentType

        public Class<? extends Geometry> getComponentType()
        Description copied from interface: Complex
        Returns the Class of which all constituent Geometrys are instances.
        Specified by:
        getComponentType in interface Complex<P extends Position,​G extends Geometry<P>>
        Returns:
        the Class of which all constituent Geometrys are instances.
      • components

        public G[] components()
        Returns the components
        Specified by:
        components in interface Complex<P extends Position,​G extends Geometry<P>>
        Returns:
        an array containing all component objects
      • getGeometryN

        public G getGeometryN​(int num)
        Returns the Geometry element at the specified (zero-based) position in this GeometryCollection.
        Parameters:
        num - the position in the collection of the requested Geometry
        Returns:
        the element Geometry at the position specified by the num parameter.
      • getDimension

        public int getDimension()
        Description copied from class: Geometry
        Returns the topological dimension of this instance. In non-homogenous collections, this will return the largest topological dimension of the contained Geometries.
        Specified by:
        getDimension in class Geometry<P extends Position>
        Returns:
        the topological dimension of this instance
      • iterator

        public Iterator<G> iterator()
        Creates an Iterator over the elements of this GeometryCollection.
        Specified by:
        iterator in interface Iterable<P extends Position>
        Returns:
        an Iterator over the elements of this GeometryCollection.
      • accept

        public void accept​(GeometryVisitor<P> visitor)
        Accepts the GeometryVisitor, and will pass it to it's constituent Geometries.
        Specified by:
        accept in class Geometry<P extends Position>
        Parameters:
        visitor -