Class ImmutablePartCollection

    • Method Detail

      • getSpatialReference

        public SpatialReference getSpatialReference()
        Gets the SpatialReference of geometries in the parts in this collection. The SpatialReference defines how the coordinates of the geometries correspond to locations in the real world. May be null.
        Returns:
        the SpatialReference of the geometries in the parts in this collection
        Since:
        100.0.0
      • get

        public ImmutablePart get​(int index)
        Gets the ImmutablePart at the given index position in this ImmutablePartCollection. Use this to access the individual immutable parts that compose a Multipart geometry.
        Specified by:
        get in interface List<ImmutablePart>
        Specified by:
        get in class AbstractList<ImmutablePart>
        Parameters:
        index - the index of the ImmutablePart to return
        Returns:
        the ImmutablePart at the given index
        Throws:
        IndexOutOfBoundsException - if index &lt; 0 || index &gt;= size()
        Since:
        100.0.0
      • getPartsAsPoints

        public Iterable<Point> getPartsAsPoints()
        Returns a copy of an iterable containing all the Points in all of the parts of this ImmutablePartCollection, ordered continuously from the first to last part in this collection. If the ImmutablePartCollection isEmpty(), this method returns an empty iterable.

        The points represent the ends of the Segments in all of the ImmutableParts in this collection (all the vertices in the Multipart geometry. Where two adjacent segments share a start and end location (there is no gap between the segments), this is represented by a single Point.

        Alternatively, to iterate the Points in each part separately, call get or java.util.AbstractList.iterator() to get an ImmutablePart, then call ImmutablePart.getPoint(int) or ImmutablePart.getPoints().

        Returns:
        an iterable set of all the Points in all the parts of this ImmutablePartCollection
        Since:
        100.0.0