parsePoint method

Coordinate parsePoint(
  1. ValueGetter data,
  2. bool haveZ,
  3. bool haveM
)

Implementation

Coordinate parsePoint(ValueGetter data, bool haveZ, bool haveM) {
  double X = data.getDouble();
  double Y = data.getDouble();
  Coordinate result;
  if (haveZ) {
    double Z = data.getDouble();
    result = Coordinate.fromXYZ(X, Y, Z);
  } else {
    result = Coordinate(X, Y);
  }

  if (haveM) {
    result.setM(data.getDouble());
  }

  return result;
}