public Coordinate lngLatToTileCoords(double lng, double lat) {
    double factor = 1 << z;
    double x = GeoUtils.getWorldX(lng) * factor;
    double y = GeoUtils.getWorldY(lat) * factor;
    return new CoordinateXY((x - Math.floor(x)) * 256, (y - Math.floor(y)) * 256);
  }
Returns the pixel coordinate on this tile of a given latitude/longitude (assuming 256x256 px tiles).
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/TileCoord.java