GeoJsonFactory<PointType extends Point<num>> class

A geospatial object factory capable of parsing GeoJSON data from json.

The implementation expects JSON objects to be compatible with objects generated by the standard json.decode().

Methods geometry(), feature(), featureSeries() and featureCollections() accepts data object to be either a String (containing valid GeoJSON) or object tree generated by the standard json.decode().

See The GeoJSON Format - RFC 7946.

Inheritance

Constructors

GeoJsonFactory({required PointFactory<PointType> pointFactory, required CreateBounds<PointType> boundsFactory, CreateFeature? featureFactory})
Create a factory with pointFactory and boundsFactory.
const

Properties

boundsFactory CreateBounds<PointType>
A function to create bounds objects from min and max points.
finalinherited
featureFactory CreateFeature
A factory function to create a Feature object.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
pointFactory PointFactory<PointType>
A factory to create point objects from coordinate values.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bounds(Iterable coords) Bounds<PointType>
Parses bounds geometry from coords.
inherited
feature<T extends Geometry>(dynamic data) Feature<T>
Parses a feature from a data object.
override
featureCollection<T extends Geometry>(dynamic data, {Range? range}) FeatureCollection<Feature<T>>
Parses a feature collection from a data object.
override
featureCount(dynamic data, {Range? range}) int
Count number of features on a collection parsed from a data object.
override
featureSeries<T extends Geometry>(dynamic data, {Range? range}) BoundedSeries<Feature<T>>
Parses a series of features from a data object.
override
geometry<T extends Geometry>(dynamic data) → T
Parses a geometry from a data object.
override
geometryCollection<T extends Geometry>(Iterable geometries) GeometryCollection<T>
Parses a geometry collection from geometries.
inherited
geometrySeries<T extends Geometry>(Iterable geometries) BoundedSeries<T>
Parses a series of geometries from geometries.
inherited
lineString(Iterable points, {LineStringType type = LineStringType.any}) LineString<PointType>
Parses a line string from series of points.
inherited
lineStringSeries(Iterable lineStrings, {LineStringType type = LineStringType.any}) BoundedSeries<LineString<PointType>>
Parses a series of line strings.
inherited
multiLineString(Iterable lineStrings) MultiLineString<PointType>
Parses a multi line string geometry from lineStrings.
inherited
multiPoint(Iterable points) MultiPoint<PointType>
Parses a multi point geometry from points.
inherited
multiPolygon(Iterable polygons) MultiPolygon<PointType>
Parses a multi polygon geometry from polygons.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
point(Iterable coords) → PointType
Parses a point geometry from coords containing at least 2 valid values.
inherited
pointSeries(Iterable points) PointSeries<PointType>
Parses a series of points (an iterable of iterables of nums).
inherited
polygon(Iterable rings) Polygon<PointType>
Parses a polygon from a series of rings (closed and simple line strings).
inherited
polygonSeries(Iterable polygons) BoundedSeries<Polygon<PointType>>
Parses a series of polygons.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited