FeatureCollection class

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
FeatureCollection.fromWKT(String wkt)
Creates a FeatureCollection from a WKT string.
factory

Properties

bbox BoundingBox
Returns the BoundingBox of the FeatureCollection If the FeatureCollection is empty, returns a BoundingBox.empty
no setter
center Point
Gets the center Point of the FeatureCollection. This is an average of all the Points that create the Features in the FeatureCollection.
no setter
convexHull Polygon
Returns the convex hull of the FeatureCollection, which is the smallest convex Polygon that contains all the Points in the FeatureCollection.
no setter
envelope Polygon
Returns the BoundingBox's Polygon of the FeatureCollection. If the FeatureCollection is empty, returns a Polygon([]).
no setter
features List<Feature>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns if the FeatureCollection is empty.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent 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 +(dynamic other) FeatureCollection
Returns the addition of the current FeatureCollection and the other, which is a Feature, a List of Features, or FeatureCollection. If the other is a Feature, it is added to the FeatureCollection. If the other is a FeatureCollection, it is added to the FeatureCollection. If the other is not a Feature or FeatureCollection, it throws an ArgumentError.
operator ==(Object other) bool
The equality operator.
inherited

Static Properties

type String
final