Class: QgsVtpkTiles¶
- class qgis.core.QgsVtpkTiles¶
Bases:
sip.wrapper
Utility class for reading and writing ESRI VTPK files.
New in version 3.26.
QgsVtpkTiles(filename: str) Constructs VTPK reader (but it does not open the file yet)
Methods
Returns the coordinate reference system of the tiles.
Returns bounding box from metadata, given in the tiles
crs()
.Returns whether the VTPK file is currently opened
Reads layer metadata from the VTPK file.
Returns the vector tile matrix set representing the tiles.
Returns the VTPK metadata.
Tries to open the file, returns true on success
Returns the VTPK sprites definitions.
Returns the VTPK sprite image, if it exists.
Returns the VTPK style definition.
Returns the raw tile data for the matching tile.
- crs(self) QgsCoordinateReferenceSystem ¶
Returns the coordinate reference system of the tiles.
- Return type:
- extent(self, context: QgsCoordinateTransformContext) QgsRectangle ¶
Returns bounding box from metadata, given in the tiles
crs()
.- Parameters:
context (QgsCoordinateTransformContext) –
- Return type:
- isOpen(self) bool ¶
Returns whether the VTPK file is currently opened
- Return type:
bool
- layerMetadata(self) QgsLayerMetadata ¶
Reads layer metadata from the VTPK file.
- Return type:
- matrixSet(self) QgsVectorTileMatrixSet ¶
Returns the vector tile matrix set representing the tiles.
- Return type:
- metadata(self) Dict[str, Any] ¶
Returns the VTPK metadata.
This method returns the contents of the “root.json” file.
- Return type:
Dict[str, Any]
- open(self) bool ¶
Tries to open the file, returns true on success
- Return type:
bool
- spriteDefinition(self) Dict[str, Any] ¶
Returns the VTPK sprites definitions.
- Return type:
Dict[str, Any]
- spriteImage(self) QImage ¶
Returns the VTPK sprite image, if it exists.
- Return type:
QImage
- styleDefinition(self) Dict[str, Any] ¶
Returns the VTPK style definition.
- Return type:
Dict[str, Any]
- tileData(self, z: int, x: int, y: int) QByteArray ¶
Returns the raw tile data for the matching tile.
- Parameters:
z (int) –
x (int) –
y (int) –
- Return type:
QByteArray