createWithMeasure static method
Factory method providing access to common Coordinate implementations.
@param dimension @param measures @return created coordinate
Implementation
static Coordinate createWithMeasure(int dimension, int measures) {
if (dimension == 2) {
return new CoordinateXY();
} else if (dimension == 3 && measures == 0) {
return new Coordinate.empty2D();
} else if (dimension == 3 && measures == 1) {
return new CoordinateXYM.empty();
} else if (dimension == 4 && measures == 1) {
return new CoordinateXYZM.empty();
}
return new Coordinate.empty2D();
}