Polygon<T extends Point<num>>.make constructor

Polygon<T extends Point<num>>.make(
  1. Iterable<Iterable<Iterable<num>>> values,
  2. PointFactory<T> pointFactory, {
  3. Bounds<Point<num>>? bounds,
})

Create Polygon from values with a list of rings.

An optional bounds can be provided or it's lazy calculated if null.

Implementation

factory Polygon.make(
  Iterable<Iterable<Iterable<num>>> values,
  PointFactory<T> pointFactory, {
  Bounds? bounds,
}) =>
    Polygon<T>(
      BoundedSeries.from(
        values.map<LineString<T>>(
          (pointSeries) => LineString<T>.make(
            pointSeries,
            pointFactory,
            type: LineStringType.ring,
          ),
        ),
        bounds: bounds,
      ),
    );