public void addPoint(double x, double y) {
    int size = size();
    if (size == 0 || getX(size - 1) != x || getY(size - 1) != y) {
      points.add(x, y);
    }
  }
Adds a coordinate to the sequence as long as it is different from the current endpoint.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/MutableCoordinateSequence.java