Polygon class
Class represengin a polygon
Constructors
- Polygon()
Properties
- coordinates → List
-
The shape's coordinates that will be serialized as the
coordinates
GeoJSON field.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
true
iif the polygon contains no ring.no setter - isNotEmpty → bool
-
true
iif the polygon contains one or more rings.no setter -
paths
→ Iterable<
Iterable< Point> > -
The shape's sets of points.
no setteroverride
-
rings
→ Iterable<
LineString> -
List of rings. Rings are represented by line-strings and should not repeat
first/last points. During serialization, the first point of each ring is
repeated automatically to meet GeoJSON requirements.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → DataType
-
The shape's data type that will be serialized as the
type
GeoJSON field.final
Methods
-
add(
LineString ring) → void - Adds a ring to the polygon.
-
addAll(
Iterable< LineString> rings) → void - Adds a set of rings to the polygon.
-
invert(
) → Polygon - Inverts the polygon by copying the rings of the current instance, only walking the ring points in reversed order.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toGeoJson(
) → Map< String, dynamic> -
Serializes to GeoJSON.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this instance to a JSON object (GeoJson).
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromGeoJson(
Map geoJson, GeospatialConfig config) → Polygon -
Deserializes from GeoJSON.
override
-
loadGeographyCoords(
Iterable coords) → Polygon -
loadGeometryCoords(
Iterable coords) → Polygon