Package org.locationtech.jts.algorithm
Class Area
- java.lang.Object
-
- org.locationtech.jts.algorithm.Area
-
public class Area extends java.lang.Object
Functions for computing area.- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description Area()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
ofRing(Coordinate[] ring)
Computes the area for a ring.static double
ofRing(CoordinateSequence ring)
Computes the area for a ring.static double
ofRingSigned(Coordinate[] ring)
Computes the signed area for a ring.static double
ofRingSigned(CoordinateSequence ring)
Computes the signed area for a ring.
-
-
-
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
-
-