FeatureCollection class Null safety

A FeatureCollection is a collection of Features.

Constructors

FeatureCollection(List<Feature> features)
FeatureCollection.fromJson(Map<String, dynamic> json)
Creates a FeatureCollection from a JSON object.
factory

Properties

bbox BoundingBox
Returns the BoundingBox of the FeatureCollection If the FeatureCollection is empty, returns a BoundingBox.empty
read-only
center Point
Gets the center Point of the FeatureCollection. This is an average of all the Points that create the Features in the FeatureCollection.
read-only
envelope Polygon
Returns the BoundingBox's Polygon of the FeatureCollection. If the FeatureCollection is empty, returns a Polygon([]).
read-only
features List<Feature>
read / write
hashCode int
The hash code for this object.
read-only, inherited
isEmpty bool
Returns if the FeatureCollection is empty.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

explode() FeatureCollection
Creates a FeatureCollection of Points from the geometries of the Features contained within.
isCollectionOf(String type) bool
Returns whether all the Features in the FeatureCollection are of the specified type. If the FeatureCollection is empty, returns false. If the type is not a valid geometry type, returns false.
nearestPointTo(Point point) Point?
Returns the Point with minimum distance between the FeatureCollection and the point. If the FeatureCollection is empty, returns an empty FeatureCollection.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the FeatureCollection to a GEOJSON FeatureCollection object.
toString() String
A string representation of this object.
override
toWKT() String
Converts the FeatureCollection to a WKT string.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

type String
final