Package org.locationtech.jts.algorithm
Class Area
java.lang.Object
org.locationtech.jts.algorithm.Area
Functions for computing area.
- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Computes the signed area for a ring.
-
Constructor Details
-
Area
public Area()
-
-
Method Details
-
ofRing
Computes the area for a ring.- Parameters:
ring
- the coordinates forming the ring- Returns:
- the area of the ring
-
ofRing
Computes the area for a ring.- Parameters:
ring
- the coordinates forming the ring- Returns:
- the area of the ring
-
ofRingSigned
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
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
-