values property

  1. @override
List<C> values

Returns coordinate values of this point as a fixed length list.

The default implementation creates a fixed length List<C> with length equaling to coordinateDimension. Then [] operator is used to populate coordinate values (see it's documentation for the coordinate ordering).

Sub classes may override the default implementation to provide more efficient approach. It's also allowed to return internal data storage for coordinate values.

For projected or cartesian coordinates, the coordinate ordering is: (x, y), (x, y, m), (x, y, z) or (x, y, z, m).

For geographic coordinates, the coordinate ordering is: (lon, lat), (lon, lat, m), (lon, lat, elev) or (lon, lat, elev, m).

Implementation

@override
List<C> get values =>
    // create fixed length list and set coordinate values on it
    List<C>.generate(coordinateDimension, (i) => this[i], growable: false);