QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsvtpktiles.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvtpktiles.h
3 --------------------------------------
4 Date : March 2022
5 Copyright : (C) 2022 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSVTPKTILES_H
17#define QGSVTPKTILES_H
18
19#include "qgis_core.h"
20
21#include "sqlite3.h"
23
24#include <QVariantMap>
25
26class QImage;
27class QgsRectangle;
30
37class CORE_EXPORT QgsVtpkTiles
38{
39 public:
41 explicit QgsVtpkTiles( const QString &filename );
42
43#ifndef SIP_RUN
45 QgsVtpkTiles( const QgsVtpkTiles &other ) = delete;
47 QgsVtpkTiles &operator=( const QgsVtpkTiles &other ) = delete;
48#endif
50
52 bool open();
53
55 bool isOpen() const;
56
62 QVariantMap metadata() const;
63
67 QVariantMap styleDefinition() const;
68
72 QVariantMap spriteDefinition() const;
73
77 QImage spriteImage() const;
78
82 QgsLayerMetadata layerMetadata() const;
83
91 QVariantMap rootTileMap() const;
92
96 QgsVectorTileMatrixSet matrixSet() const;
97
102
106 QgsRectangle extent( const QgsCoordinateTransformContext &context ) const;
107
116 QByteArray tileData( int z, int x, int y );
117
118 private:
119
120#ifdef SIP_RUN
122 QgsVtpkTiles( const QgsVtpkTiles &other );
123#endif
124
125 QString mFilename;
126 struct zip *mZip = nullptr;
127 mutable QVariantMap mMetadata;
128 mutable QgsVectorTileMatrixSet mMatrixSet;
129 mutable QString mTileMapPath;
130 mutable bool mHasReadTileMap = false;
131 mutable QVariantMap mRootTileMap;
132 mutable int mPacketSize = -1;
133};
134
135
136#endif // QGSVTPKTILES_H
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
A structured metadata store for a map layer.
A rectangle specified with double values.
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
Utility class for reading and writing ESRI VTPK files.
QgsVtpkTiles(const QgsVtpkTiles &other)=delete
QgsVtpkTiles cannot be copied.
QgsVtpkTiles & operator=(const QgsVtpkTiles &other)=delete
QgsVtpkTiles cannot be copied.
const QgsCoordinateReferenceSystem & crs