public static TileArchiveConfig from(URI uri) {
    if (uri.getScheme() == null) {
      final String path = uri.getPath();
      String base = Path.of(path).toAbsolutePath().toUri().normalize().toString();
      if (path.endsWith("/")) {
        base = base + "/";
      }
      if (uri.getRawQuery() != null) {
        base += "?" + uri.getRawQuery();
      }
      uri = URI.create(base);
    }
    return new TileArchiveConfig(
      getFormat(uri),
      getScheme(uri),
      uri,
      parseQuery(uri)
    );
  }
Parses a string definition of a tileset from a URI.
planetiler-core/src/main/java/com/onthegomap/planetiler/archive/TileArchiveConfig.java