MultiLineString class
A MultiLineString is a Feature made up of a List of LineString Coordinates.
Constructors
-
MultiLineString(List<
List< coordinates, {Map<Coordinate> >String, dynamic> properties = const <String, dynamic>{}}) -
MultiLineString.fromJson(Map<
String, dynamic> json) -
Creates a MultiLineString from a valid GeoJSON object.
factory
- MultiLineString.fromWKT(String wkt)
-
Creates a MultiLineString from a WKT String.
factory
- MultiLineString.random({int count = 1, int length = 2})
-
Creates a random MultiLineString with a given number of lines (
count
) and length of each line (length
). Thelength
is the number of points in each line (must be 2 or more). Thecount
is the number of lines in the MultiLineString (must be one or more).factory
Properties
- bbox → BoundingBox
-
Returns the BoundingBox of the MultiLineString
no setteroverride
- center → Point
-
Returns the center Point of the MultiLineString.
no setteroverride
-
coordinates
↔ List<
List< Coordinate> > -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → double
-
Returns the total distance of the MultiLineString in meters.
This is the sum of the distances of each LineString in the MultiLineString.
The distance is calculated using the Haversine formula.
no setter
-
properties
↔ Map<
String, dynamic> -
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
explode(
) → List< Point> -
Explodes the MultiLineString into a List of Points.
override
-
flatten(
) → FeatureCollection - Flattens the MultiLineString into a FeatureCollection of LineStrings. Properties are inherited from the MultiLineString.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a GeoJSON representation of the MultiLineString.
override
-
toString(
) → String -
A string representation of this object.
override
-
toWKT(
) → String -
Converts the MultiLineString to a String in WKT format.
override
-
union(
MultiLineString other) → MultiLineString - Returns a MultiLineString that is the union of this MultiLineString and another MultiLineString. The resulting MultiLineString will have the same properties as this MultiLineString.
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