Point class Null safety

A Point is a single position in a coordinate system, with properties. A Point can be created from a Coordinate, from a WKT String, or from a GeoJSON Map. A Point can be converted to a WKT String or GeoJSON Map.

Example:

Point(Coordinate(1, 2), {'name': 'point'}); // Point(Coordinate(1, 2), {'name': 'point'})
Point(Coordinate(1, 2), {'name': 'point'}).toWKT(); // POINT(1 2)
Point(Coordinate(1, 2), {'name': 'point'}).toJson(); // {'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [1, 2]}, 'properties': {'name': 'point'}}
Inheritance

Constructors

Point(Coordinate coordinate, {dynamic properties = const <String, dynamic>{}})
Point.fromJson(Map<String, dynamic> json)
Creates a Point from a GeoJSON Map.
factory
Point.fromLatLong(double latitude, double longitude)
Creates a Point from a Lat/Long pair.
factory
Point.fromWKT(String wkt)
Creates a Point from a WKT String.
factory

Properties

coordinate Coordinate
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

explode() List<Point>
Explodes the Point into a list of Points Pretty useless, but needs to overwrite the Feature method.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the Point to a GeoJSON Map.
override
toString() String
A string representation of this object.
override
toWKT() String
Converts the Point to a WKT String.
override

Operators

operator ==(Object other) bool
Checks for equality between two Points, specifically if they have the same coordinate and properties.
override

Static Properties

type String
final