operator [] method
A coordinate value by the coordinate axis index i
.
Returns zero when a coordinate axis is not available.
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
num operator [](int i) {
switch (i) {
case 0:
return x;
case 1:
return y;
case 2:
return z;
case 3:
return m;
default:
return 0.0;
}
}