Class MbTilesModelDecoder

java.lang.Object
com.luciad.formats.mbtiles.MbTilesModelDecoder

public final class MbTilesModelDecoder extends Object
A model decoder for MBTiles data.

See MbTilesModelDecoder#decode for more details.

Since:
2024.0
  • Method Details

    • decode

      @NotNull public static Model decode(@NotNull String source) throws IOException
      Creates a model for a MBTiles data set.

      This method uses default options. If you need to customize access to resources please use the method with options. You can also find detailed information on the method with options.

      Parameters:
      source - the file path to the .mbtiles file or a url for a TileJSON.
      Returns:
      the model.
      Throws:
      IOException - when creating the model fails.
      See Also:
    • decode

      @NotNull public static Model decode(@NotNull String source, @NotNull MbTilesModelDecoderOptions options) throws IOException
      Creates a model for a MBTiles data set.

      Supported versions

      The MBTiles model decoder allows accessing MBTiles data according to the following specification:

      Supported files

      File Entry point Description
      .mbtiles x SQLite3 database containing the metadata as well as the tile data.
      http(s)://host//path x TileJSON containing metadata on the tile data and how to access the resources.

      Vector tiles

      Support for the pbf format which refers to vector tile data in the Mapbox Vector Tile format.

      The returned IFeatureTileModel is not queryable through the public API.

      Image tiles

      The following tile formats are supported:

      • PNG
      • JPEG
      • WebP

      Elevation tiles

      The only supported tile format is PNG.

      Options

      The options allow to specify the tile type (vector, image or elevation), as well as the http(s) client. The http client is ignored in case of decoding a .mbtiles file.

      Parameters:
      source - the file path to the .mbtiles file or a url for a TileJSON.
      options - options for decoding the MBTiles data.
      Returns:
      the model.
      Throws:
      IOException - when creating the model fails.