private MCoordinate toJTSCoordinate(Point pt) { MCoordinate mc; if (pt.dimension == 2) { mc = pt.haveMeasure ? MCoordinate.create2dWithMeasure(pt.getX(), pt .getY(), pt.getM()) : MCoordinate.create2d(pt.getX(), pt .getY()); } else { mc = pt.haveMeasure ? MCoordinate.create3dWithMeasure(pt.getX(), pt .getY(), pt.getZ(), pt.getM()) : MCoordinate.create3d(pt .getX(), pt.getY(), pt.getZ()); } return mc; }