MultiPolygon class Null safety

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

Inheritance

Constructors

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

Properties

area double
The area of the MultiPolygon in square meters.
read-only
bbox BoundingBox
Returns the BoundingBox of the MultiPolygon.
read-only, override
center Point
Returns the center Point of the Feature. This is the average of all Coordinates in the Feature.
read-only, override
coordinates List<List<LinearRing>>
read / write
hashCode int
The hash code for this object.
read-only, inherited
properties Map<String, dynamic>
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 ==(Object other) bool
The equality operator.
inherited

Static Properties

type String
final