QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsVectorTileMVTDecoder Class Reference

This class is responsible for decoding raw tile data written with Mapbox Vector Tiles encoding. More...

#include <qgsvectortilemvtdecoder.h>

Public Member Functions

 QgsVectorTileMVTDecoder (const QgsVectorTileMatrixSet &structure)
 Constructor for QgsVectorTileMVTDecoder, using the specified tile structure. More...
 
 ~QgsVectorTileMVTDecoder ()
 
bool decode (QgsTileXYZ tileID, const QByteArray &rawTileData)
 Tries to decode raw tile data, returns true on success. More...
 
QgsVectorTileFeatures layerFeatures (const QMap< QString, QgsFields > &perLayerFields, const QgsCoordinateTransform &ct, const QSet< QString > *layerSubset=nullptr) const
 Returns decoded features grouped by sub-layers. More...
 
QStringList layerFieldNames (const QString &layerName) const
 Returns a list of all field names in a tile. It can only be called after a successful decode() More...
 
QStringList layers () const
 Returns a list of sub-layer names in a tile. It can only be called after a successful decode() More...
 

Detailed Description

This class is responsible for decoding raw tile data written with Mapbox Vector Tiles encoding.

Since
QGIS 3.14

Definition at line 38 of file qgsvectortilemvtdecoder.h.

Constructor & Destructor Documentation

◆ QgsVectorTileMVTDecoder()

QgsVectorTileMVTDecoder::QgsVectorTileMVTDecoder ( const QgsVectorTileMatrixSet structure)

Constructor for QgsVectorTileMVTDecoder, using the specified tile structure.

Definition at line 34 of file qgsvectortilemvtdecoder.cpp.

◆ ~QgsVectorTileMVTDecoder()

QgsVectorTileMVTDecoder::~QgsVectorTileMVTDecoder ( )
default

Member Function Documentation

◆ decode()

bool QgsVectorTileMVTDecoder::decode ( QgsTileXYZ  tileID,
const QByteArray &  rawTileData 
)

Tries to decode raw tile data, returns true on success.

Definition at line 40 of file qgsvectortilemvtdecoder.cpp.

◆ layerFeatures()

QgsVectorTileFeatures QgsVectorTileMVTDecoder::layerFeatures ( const QMap< QString, QgsFields > &  perLayerFields,
const QgsCoordinateTransform ct,
const QSet< QString > *  layerSubset = nullptr 
) const

Returns decoded features grouped by sub-layers.

It can only be called after a successful decode()

If layerSubset is specified then only features from the specified layers will be returned.

Definition at line 88 of file qgsvectortilemvtdecoder.cpp.

◆ layerFieldNames()

QStringList QgsVectorTileMVTDecoder::layerFieldNames ( const QString &  layerName) const

Returns a list of all field names in a tile. It can only be called after a successful decode()

Definition at line 71 of file qgsvectortilemvtdecoder.cpp.

◆ layers()

QStringList QgsVectorTileMVTDecoder::layers ( ) const

Returns a list of sub-layer names in a tile. It can only be called after a successful decode()

Definition at line 57 of file qgsvectortilemvtdecoder.cpp.


The documentation for this class was generated from the following files: