private void slicePoint(Coordinate coord) {
    double worldX = coord.getX();
    double worldY = coord.getY();
    int minX = (int) Math.floor(worldX - neighborBuffer);
    int maxX = (int) Math.floor(worldX + neighborBuffer);
    int minY = Math.max(extents.minY(), (int) Math.floor(worldY - neighborBuffer));
    int maxY = Math.min(extents.maxY() - 1, (int) Math.floor(worldY + neighborBuffer));
    for (int x = minX; x <= maxX; x++) {
      double tileX = worldX - x;
      int wrappedX = wrapInt(x, maxTilesAtThisZoom);
      // point may end up inside bounds after wrapping
      if (extents.testX(wrappedX)) {
        for (int y = minY; y <= maxY; y++) {
          if (extents.test(wrappedX, y)) {
            TileCoord tile = TileCoord.ofXYZ(wrappedX, y, z);
            double tileY = worldY - y;
            tileContents.computeIfAbsent(tile, t -> List.of(new ArrayList<>()))
              .getFirst()
              .add(GeoUtils.coordinateSequence(tileX * 256, tileY * 256));
          }
        }
      }
    }
  }
Adds a new point to {@code out} where the line segment from (ax,ay) to (bx,by) crosses a horizontal line at y=y.
planetiler-core/src/main/java/com/onthegomap/planetiler/render/TiledGeometry.java