computeRing method

void computeRing()

Compute a LinearRing from the point list previously collected. Test if the ring is a hole (i.e. if it is CCW) and set the hole flag accordingly.

Implementation

void computeRing() {
  if (ring != null) return; // don't compute more than once
  List<Coordinate> coord = []; //..length = (pts.length);
  for (int i = 0; i < pts.length; i++) {
    coord.add(pts[i]);
    // coord[i] = pts[i];
  }
  ring = geometryFactory.createLinearRing(coord);
  _isHole = Orientation.isCCW(ring!.getCoordinates());
//Debug.println( (isHole ? "hole - " : "shell - ") + WKTWriter.toLineString(new CoordinateArraySequence(ring.getCoordinates())));
}