Point<C extends num> class abstract

Point is a read-only position with x, y, z and m coordinates.

The type C of coordinate values is either num (allowing double or int), double or int.

All concrete implementations must contain at least x and y coordinate values, but z and m coordinates are optional (getters should return 0 value when such a coordinate axis is not available).

When a position contains geographic coordinates, then by default x represents longitude, y represents latitude, and z represents elevation (or height or altitude).

A projected map position might be defined as easting (E) and northing (N) coordinates. It's suggested that then E == x and N == y, but a coordinate reference system might specify something else too.

m represents a measurement or a value on a linear referencing system (like time). It could be associated with a 2D position (x, y, m) or a 3D position (x, y, z, m).

Inheritance
Implemented types
Implementers

Constructors

Point()
Default const constructor to allow extending this abstract class.
const

Properties

bounds Bounds<Point<num>>?
The bounds for this object (could be calculated if not explicitely set).
no setter
boundsExplicit Bounds<Point<num>>?
The explicit bounds for this object when available.
no setter
coordinateDimension int
The number of coordinate values (2, 3 or 4).
no setterinherited
dimension int
The topological dimension of this geometry.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
is3D bool
True for 3D positions (with z or elevation coordinate).
no setterinherited
isEmpty bool
True if this geometry is considered empty without data or coordinates.
no setteroverride
isGeographic bool
True for geographic coordinates (with longitude and latitude).
no setter
isMeasured bool
True if a measure value is available (or the m coordinate for a position).
no setterinherited
isNotEmpty bool
True if this geometry is NOT considered empty without data or coordinates.
no setteroverride
m → C
The m ("measure") coordinate value. Returns zero if not available.
no setter
onePoint Point<num>?
Returns one of points contained by this geometry if it's not empty.
no setteroverride
optM → C?
The m ("measure") coordinate optionally. Returns null if not available.
no setter
optZ → C?
The z coordinate value optionally. Returns null if not available.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spatialDimension int
The number of spatial coordinate values (2 for 2D or 3 for 3D).
no setterinherited
type Coords
The coordinate type.
no setterinherited
typeGeom Geom
The type of this geometry.
no setteroverride
values List<C>
Returns coordinate values of this point as a fixed length list.
no setter
x → C
The x coordinate value.
no setter
y → C
The y coordinate value.
no setter
z → C
The z coordinate value. Returns zero if not available.
no setter

Methods

copyTo<R extends Position>(CreatePosition<R> factory) → R
Copies this position to a new position created by the factory.
override
copyWith({num? x, num? y, num? z, num? m}) Point<num>
Copies this point with optional x, y, z and m overriding values.
equals2D(Position other, {num? toleranceHoriz}) bool
True if this position equals with other by testing 2D coordinates only.
override
equals3D(Position other, {num? toleranceHoriz, num? toleranceVert}) bool
True if this position equals with other by testing 3D coordinates only.
override
newFrom(Iterable<num> coords, {int? offset, int? length}) Point<num>
Creates a new point instance of a type compatible with this object.
inherited
newWith({num x = 0.0, num y = 0.0, num? z, num? m}) Point<num>
Creates a new point instance of a type compatible with this object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project<R extends Point<num>>(Projection projection, {required CreatePosition<R> to}) → R
Returns a new point projected from this point using projection.
override
toString() String
A string representation of this object.
inherited
toStringAs({TextWriterFormat<GeometryContent> format = DefaultFormat.geometry, int? decimals}) String
A string representation of this geometry, with format applied.
inherited
transform(TransformPosition transform) Point<num>
Returns a new point transformed from this point using transform.
override
valuesAsString({String delimiter = ',', int? decimals}) String
A string representation of coordinate values separated by delimiter.
writeTo(SimpleGeometryContent writer) → void
Writes this geometry object to writer.
override
writeValues(StringSink buffer, {String delimiter = ',', int? decimals}) → void
Writes coordinate values to buffer separated by delimiter.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int i) → C
A coordinate value by the coordinate axis index i.