LuciadCPillar 2024.0.02
luciad::MbTilesModelDecoder Class Referencefinal

A model decoder for MBTiles data. More...

#include <luciad/formats/mbtiles/MbTilesModelDecoder.h>

Public Member Functions

 MbTilesModelDecoder ()=delete
 
 ~MbTilesModelDecoder ()=delete
 

Static Public Member Functions

static luciad::expected< std::shared_ptr< Model >, ErrorInfodecode (const std::string &source)
 Creates a model for a MBTiles data set. More...
 
static luciad::expected< std::shared_ptr< Model >, ErrorInfodecode (const std::string &source, const MbTilesModelDecoderOptions &options)
 Creates a model for a MBTiles data set. More...
 

Detailed Description

A model decoder for MBTiles data.

See MbTilesModelDecoder::decode for more details.

Since
2024.0

Constructor & Destructor Documentation

◆ MbTilesModelDecoder()

luciad::MbTilesModelDecoder::MbTilesModelDecoder ( )
delete

◆ ~MbTilesModelDecoder()

luciad::MbTilesModelDecoder::~MbTilesModelDecoder ( )
delete

Member Function Documentation

◆ decode() [1/2]

static luciad::expected< std::shared_ptr< Model >, ErrorInfo > luciad::MbTilesModelDecoder::decode ( const std::string &  source)
static

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
sourcethe file path to the .mbtiles file or a url for a TileJSON.
Returns
the model.
See also
MbTilesModelDecoder::decode(const std::string&,const MbTilesModelDecoderOptions&)

◆ decode() [2/2]

static luciad::expected< std::shared_ptr< Model >, ErrorInfo > luciad::MbTilesModelDecoder::decode ( const std::string &  source,
const MbTilesModelDecoderOptions options 
)
static

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

Options

The options for MBTiles decoding is limited to http(s) access. The http client is ignored in case of decoding a .mbtiles file.

Parameters
sourcethe file path to the .mbtiles file or a url for a TileJSON.
optionsoptions for decoding the MBTiles data.
Returns
the model.