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

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()

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

◆ 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: