/** * Computes the area for a ring. * * @param ring the coordinates forming the ring * @return the area of the ring */ public static double ofRing(Coordinate[] ring) { return Math.abs(ofRingSigned(ring)); }
/** * Computes the area for a ring. * * @param ring the coordinates forming the ring * @return the area of the ring */ public static double ofRing(CoordinateSequence ring) { return Math.abs(ofRingSigned(ring)); }
double area = Area.ofRingSigned(r.getCoordinates());
double area = Area.ofRingSigned(r.getCoordinates());
void checkAreaOfRingSigned(String wkt, double expectedArea) { LinearRing ring = (LinearRing) read(wkt); Coordinate[] ringPts = ring.getCoordinates(); double actual1 = Area.ofRingSigned(ringPts); assertEquals(actual1, expectedArea); CoordinateSequence ringSeq = ring.getCoordinateSequence(); double actual2 = Area.ofRingSigned(ringSeq); assertEquals(actual2, expectedArea); } }
final double exteriorArea = Area.ofRingSigned(exteriorRing.getCoordinates()); if (((int) Math.round(exteriorArea)) == 0) { continue; final double interiorArea = Area.ofRingSigned(nextInteriorRing.getCoordinates()); if (((int) Math.round(interiorArea)) == 0) { continue;