MultiPolygon class

A MultiPolygon is a collection of Polygon Geometries with shared properties.

Inheritance

Constructors

MultiPolygon(List<List<LinearRing>> coordinates, {Map<String, dynamic> properties = const <String, dynamic>{}})
MultiPolygon.fromJson(Map<String, dynamic> json)
Creates a MultiPolygon from a GeoJSON Map.
factory
MultiPolygon.fromWKT(String wkt)
Creates a MultiPolygon from a WKT String.
factory

Properties

area double
The area of the MultiPolygon in square meters.
no setter
bbox BoundingBox
Returns the BoundingBox of the MultiPolygon.
no setteroverride
center Point
Returns the center Point of the Feature. This is the average of all Coordinates in the Feature.
no setteroverride
coordinates List<List<LinearRing>>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasSelfIntersections bool
Returns whether or not the MultiPolygon overlaps itself.
no setter
properties Map<String, dynamic>
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(Point point) bool
Returns whether or not the Point is contained within the MultiPolygon. This is done by checking if the Point is contained within any of the Polygons. Uses the Ray Casting algorithm.
explode() List<Point>
explode the MultiPolygon into a List of Points.
override
flatten() FeatureCollection
Breaks the MultiPolygon into a FeatureCollection containing each Polygons. Also, copies the properties of the MultiPolygon to each Polygon.
intersects({MultiPolygon? multi, Polygon? poly}) bool
Returns whether or not the MultiPolygon intersects another MultiPolygon or Polygon.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns a GeoJSON representation of the MultiPolygon
override
toMultiLineString() MultiLineString
Converts the MultiPolygon to a WKT a MultiLineString. Uses the outer ring of each polygon, all holes are ignored.
toString() String
A string representation of this object.
override
toWKT() String
Converts the MultiPolygon to a WKT String.
override
union({MultiPolygon? multi, Polygon? poly}) MultiPolygon
Returns a MultiPolygon that is the union of this MultiPolygon and another MultiPolygon or Polygon. The resulting MultiPolygon will have the same properties as this MultiPolygon.

Operators

operator +(Feature other) FeatureCollection
Adds two Features together to form a FeatureCollection. Each Feature in the FeatureCollection will retain their properties and coordinates.
inherited
operator ==(Object other) bool
The equality operator.
inherited

Static Properties

type String
final