getCoordinateInternal method
@see PackedCoordinateSequence#getCoordinate(int)
Implementation
Coordinate getCoordinateInternal(int i) {
double x = coords[i * dimension];
double y = coords[i * dimension + 1];
if (dimension == 2 && measures == 0) {
return new CoordinateXY.fromXY(x, y);
} else if (dimension == 3 && measures == 0) {
double z = coords[i * dimension + 2];
return new Coordinate.fromXYZ(x, y, z);
} else if (dimension == 3 && measures == 1) {
double m = coords[i * dimension + 2];
return new CoordinateXYM(x, y, m);
} else if (dimension == 4 && measures == 1) {
double z = coords[i * dimension + 2];
double m = coords[i * dimension + 3];
return new CoordinateXYZM(x, y, z, m);
}
return new CoordinateXY.fromXY(x, y);
}