FeatureCollection<E extends Feature<Geometry>> constructor

FeatureCollection<E extends Feature<Geometry>>({
  1. required Iterable<E> features,
  2. Bounds<Point<num>>? bounds,
})

Creates a feature collection from a series of features.

The features must be an iterable or BoundedSeries containing feature objects.

If an optional bounds for a new feature collection is not provided then bounds of the series of features is used also as collection bounds.

Implementation

factory FeatureCollection({
  required Iterable<E> features,
  Bounds? bounds,
}) =>
    FeatureCollection.of(
      features: features is BoundedSeries<E>
          ? features
          : BoundedSeries.view(features),
      bounds: bounds,
    );