Class Area


  • public class Area
    extends java.lang.Object
    Functions for computing area.
    Author:
    Martin Davis
    • Constructor Detail

      • Area

        public Area()
    • Method Detail

      • ofRing

        public static double ofRing​(Coordinate[] ring)
        Computes the area for a ring.
        Parameters:
        ring - the coordinates forming the ring
        Returns:
        the area of the ring
      • ofRing

        public static double ofRing​(CoordinateSequence ring)
        Computes the area for a ring.
        Parameters:
        ring - the coordinates forming the ring
        Returns:
        the area of the ring
      • ofRingSigned

        public static double ofRingSigned​(Coordinate[] ring)
        Computes the signed area for a ring. The signed area is positive if the ring is oriented CW, negative if the ring is oriented CCW, and zero if the ring is degenerate or flat.
        Parameters:
        ring - the coordinates forming the ring
        Returns:
        the signed area of the ring
      • ofRingSigned

        public static double ofRingSigned​(CoordinateSequence ring)
        Computes the signed area for a ring. The signed area is:
        • positive if the ring is oriented CW
        • negative if the ring is oriented CCW
        • zero if the ring is degenerate or flat
        Parameters:
        ring - the coordinates forming the ring
        Returns:
        the signed area of the ring