QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
QgsVtpkTiles Class Reference

Utility class for reading and writing ESRI VTPK files. More...

#include <qgsvtpktiles.h>

Public Member Functions

 QgsVtpkTiles (const QgsVtpkTiles &other)=delete
 QgsVtpkTiles cannot be copied. More...
 
 QgsVtpkTiles (const QString &filename)
 Constructs VTPK reader (but it does not open the file yet) More...
 
 ~QgsVtpkTiles ()
 
QgsCoordinateReferenceSystem crs () const
 Returns the coordinate reference system of the tiles. More...
 
QgsRectangle extent (const QgsCoordinateTransformContext &context) const
 Returns bounding box from metadata, given in the tiles crs(). More...
 
bool isOpen () const
 Returns whether the VTPK file is currently opened. More...
 
QgsLayerMetadata layerMetadata () const
 Reads layer metadata from the VTPK file. More...
 
QgsVectorTileMatrixSet matrixSet () const
 Returns the vector tile matrix set representing the tiles. More...
 
QVariantMap metadata () const
 Returns the VTPK metadata. More...
 
bool open ()
 Tries to open the file, returns true on success. More...
 
QgsVtpkTilesoperator= (const QgsVtpkTiles &other)=delete
 QgsVtpkTiles cannot be copied. More...
 
QVariantMap rootTileMap () const
 Returns the root tilemap content, if it exists. More...
 
QVariantMap spriteDefinition () const
 Returns the VTPK sprites definitions. More...
 
QImage spriteImage () const
 Returns the VTPK sprite image, if it exists. More...
 
QVariantMap styleDefinition () const
 Returns the VTPK style definition. More...
 
QByteArray tileData (int z, int x, int y)
 Returns the raw tile data for the matching tile. More...
 

Detailed Description

Utility class for reading and writing ESRI VTPK files.

Since
QGIS 3.26

Definition at line 37 of file qgsvtpktiles.h.

Constructor & Destructor Documentation

◆ QgsVtpkTiles() [1/2]

QgsVtpkTiles::QgsVtpkTiles ( const QString &  filename)
explicit

Constructs VTPK reader (but it does not open the file yet)

Definition at line 34 of file qgsvtpktiles.cpp.

◆ QgsVtpkTiles() [2/2]

QgsVtpkTiles::QgsVtpkTiles ( const QgsVtpkTiles other)
delete

QgsVtpkTiles cannot be copied.

◆ ~QgsVtpkTiles()

QgsVtpkTiles::~QgsVtpkTiles ( )

Definition at line 39 of file qgsvtpktiles.cpp.

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsVtpkTiles::crs ( ) const

Returns the coordinate reference system of the tiles.

Definition at line 397 of file qgsvtpktiles.cpp.

◆ extent()

QgsRectangle QgsVtpkTiles::extent ( const QgsCoordinateTransformContext context) const

Returns bounding box from metadata, given in the tiles crs().

Definition at line 402 of file qgsvtpktiles.cpp.

◆ isOpen()

bool QgsVtpkTiles::isOpen ( ) const

Returns whether the VTPK file is currently opened.

Definition at line 83 of file qgsvtpktiles.cpp.

◆ layerMetadata()

QgsLayerMetadata QgsVtpkTiles::layerMetadata ( ) const

Reads layer metadata from the VTPK file.

Definition at line 250 of file qgsvtpktiles.cpp.

◆ matrixSet()

QgsVectorTileMatrixSet QgsVtpkTiles::matrixSet ( ) const

Returns the vector tile matrix set representing the tiles.

Definition at line 388 of file qgsvtpktiles.cpp.

◆ metadata()

QVariantMap QgsVtpkTiles::metadata ( ) const

Returns the VTPK metadata.

This method returns the contents of the "root.json" file.

Definition at line 88 of file qgsvtpktiles.cpp.

◆ open()

bool QgsVtpkTiles::open ( )

Tries to open the file, returns true on success.

Definition at line 48 of file qgsvtpktiles.cpp.

◆ operator=()

QgsVtpkTiles & QgsVtpkTiles::operator= ( const QgsVtpkTiles other)
delete

QgsVtpkTiles cannot be copied.

◆ rootTileMap()

QVariantMap QgsVtpkTiles::rootTileMap ( ) const

Returns the root tilemap content, if it exists.

This method returns the contents of the "tilemap/root.json" file.

Since
QGIS 3.32

Definition at line 340 of file qgsvtpktiles.cpp.

◆ spriteDefinition()

QVariantMap QgsVtpkTiles::spriteDefinition ( ) const

Returns the VTPK sprites definitions.

Definition at line 161 of file qgsvtpktiles.cpp.

◆ spriteImage()

QImage QgsVtpkTiles::spriteImage ( ) const

Returns the VTPK sprite image, if it exists.

Definition at line 205 of file qgsvtpktiles.cpp.

◆ styleDefinition()

QVariantMap QgsVtpkTiles::styleDefinition ( ) const

Returns the VTPK style definition.

Definition at line 127 of file qgsvtpktiles.cpp.

◆ tileData()

QByteArray QgsVtpkTiles::tileData ( int  z,
int  x,
int  y 
)

Returns the raw tile data for the matching tile.

Returns a null byte array if the requested tile does not exist.

Will return an empty byte array (as opposed to a null byte array) if the tile exists but has a zero size.

Definition at line 431 of file qgsvtpktiles.cpp.


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