createPolygon method

Polygon createPolygon(
  1. LinearRing? shell,
  2. List<LinearRing>? holes
)

Constructs a Polygon with the given exterior boundary and interior boundaries.

@param shell the outer boundary of the new Polygon, or null or an empty LinearRing if the empty geometry is to be created. @param holes the inner boundaries of the new Polygon, or null or empty LinearRing s if the empty geometry is to be created. @throws IllegalArgumentException if a ring is invalid

Implementation

Polygon createPolygon(LinearRing? shell, List<LinearRing>? holes) {
  return Polygon.withFactory(shell, holes, this);
}