Package mil.nga.sf

Class GeometryCollection<T extends Geometry>

    • Constructor Detail

      • GeometryCollection

        public GeometryCollection()
        Constructor
      • GeometryCollection

        public GeometryCollection​(boolean hasZ,
                                  boolean hasM)
        Constructor
        Parameters:
        hasZ - has z
        hasM - has m
      • GeometryCollection

        public GeometryCollection​(List<T> geometries)
        Constructor
        Parameters:
        geometries - list of geometries
      • GeometryCollection

        public GeometryCollection​(T geometry)
        Constructor
        Parameters:
        geometry - geometry
      • GeometryCollection

        public GeometryCollection​(GeometryCollection<T> geometryCollection)
        Copy Constructor
        Parameters:
        geometryCollection - geometry collection to copy
      • GeometryCollection

        protected GeometryCollection​(GeometryType type,
                                     boolean hasZ,
                                     boolean hasM)
        Constructor
        Parameters:
        type - geometry type
        hasZ - has z
        hasM - has m
    • Method Detail

      • getGeometries

        public List<T> getGeometries()
        Get the list of geometries
        Returns:
        geometries
      • setGeometries

        public void setGeometries​(List<T> geometries)
        Set the geometries
        Parameters:
        geometries - geometries
      • addGeometry

        public void addGeometry​(T geometry)
        Add a geometry
        Parameters:
        geometry - geometry
      • addGeometries

        public void addGeometries​(List<T> geometries)
        Add geometries
        Parameters:
        geometries - geometries
      • numGeometries

        public int numGeometries()
        Get the number of geometries in the collection
        Returns:
        number of geometries
      • getGeometry

        public T getGeometry​(int n)
        Returns the Nth geometry
        Parameters:
        n - nth geometry to return
        Returns:
        geometry
      • isMultiPoint

        public boolean isMultiPoint()
        Determine if this geometry collection is a MultiPoint instance or contains only Point geometries
        Returns:
        true if a multi point or contains only points
      • getAsMultiPoint

        public MultiPoint getAsMultiPoint()
        Get as a MultiPoint, either the current instance or newly created from the Point geometries
        Returns:
        multi point
      • isMultiLineString

        public boolean isMultiLineString()
        Determine if this geometry collection is a MultiLineString instance or contains only LineString geometries
        Returns:
        true if a multi line string or contains only line strings
      • isMultiPolygon

        public boolean isMultiPolygon()
        Determine if this geometry collection is a MultiPolygon instance or contains only Polygon geometries
        Returns:
        true if a multi polygon or contains only polygons
      • getAsMultiPolygon

        public MultiPolygon getAsMultiPolygon()
        Get as a MultiPolygon, either the current instance or newly created from the Polygon geometries
        Returns:
        multi polygon
      • isMultiCurve

        public boolean isMultiCurve()
        Determine if this geometry collection contains only Curve geometries
        Returns:
        true if contains only curves
      • getAsMultiCurve

        public GeometryCollection<Curve> getAsMultiCurve()
        Get as a Multi Curve, a Curve typed Geometry Collection
        Returns:
        multi curve
      • isMultiSurface

        public boolean isMultiSurface()
        Determine if this geometry collection contains only Surface geometries
        Returns:
        true if contains only surfaces
      • getAsGeometryCollection

        public GeometryCollection<Geometry> getAsGeometryCollection()
        Get as a top level Geometry Collection
        Returns:
        geometry collection
      • copy

        public Geometry copy()
        Copy the geometry
        Specified by:
        copy in class Geometry
        Returns:
        geometry copy
      • isEmpty

        public boolean isEmpty()
        Is the Geometry empty
        Specified by:
        isEmpty in class Geometry
        Returns:
        true if empty
      • isSimple

        public boolean isSimple()
        Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency
        Specified by:
        isSimple in class Geometry
        Returns:
        true if simple