Package mil.nga.sf

Class CurvePolygon<T extends Curve>

  • Type Parameters:
    T - curve type
    All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    Polygon

    public class CurvePolygon<T extends Curve>
    extends Surface
    A planar surface defined by an exterior ring and zero or more interior ring. Each ring is defined by a Curve instance.
    Author:
    osbornb
    See Also:
    Serialized Form
    • Constructor Detail

      • CurvePolygon

        public CurvePolygon()
        Constructor
      • CurvePolygon

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

        public CurvePolygon​(List<T> rings)
        Constructor
        Parameters:
        rings - list of rings
      • CurvePolygon

        public CurvePolygon​(T ring)
        Constructor
        Parameters:
        ring - ring
      • CurvePolygon

        public CurvePolygon​(CurvePolygon<T> curvePolygon)
        Copy Constructor
        Parameters:
        curvePolygon - curve polygon to copy
      • CurvePolygon

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

      • getRings

        public List<T> getRings()
        Get the rings
        Returns:
        rings
      • setRings

        public void setRings​(List<T> rings)
        Set the rings
        Parameters:
        rings - rings
      • addRing

        public void addRing​(T ring)
        Add a ring
        Parameters:
        ring - ring
      • addRings

        public void addRings​(List<T> rings)
        Add rings
        Parameters:
        rings - rings
      • numRings

        public int numRings()
        Get the number of rings including exterior and interior
        Returns:
        number of rings
      • getRing

        public T getRing​(int n)
        Returns the Nth ring where the exterior ring is at 0, interior rings begin at 1
        Parameters:
        n - nth ring to return
        Returns:
        ring
      • getExteriorRing

        public T getExteriorRing()
        Get the exterior ring
        Returns:
        exterior ring
      • numInteriorRings

        public int numInteriorRings()
        Get the number of interior rings
        Returns:
        number of interior rings
      • getInteriorRing

        public T getInteriorRing​(int n)
        Returns the Nth interior ring for this Polygon
        Parameters:
        n - interior ring number
        Returns:
        interior ring
      • 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