copyInternal method

Polygon copyInternal()
override

An internal method to copy subclass-specific geometry data.

@return a copy of the target geometry object.

Implementation

Polygon copyInternal() {
  LinearRing shellCopy = shell!.copy() as LinearRing;
  List<LinearRing> holeCopies = []; //..length = this.holes!.length;
  for (int i = 0; i < holes!.length; i++) {
    holeCopies.add(holes![i].copy() as LinearRing);
    // holeCopies[i] = holes![i].copy() as LinearRing;
  }
  return new Polygon.withFactory(shellCopy, holeCopies, geomFactory);
}