QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
vectortile
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 <sqlite3.h>
20
21
#include "qgis_core.h"
22
#include "
qgsvectortilematrixset.h
"
23
24
#include <QVariantMap>
25
26
class
QImage;
27
class
QgsRectangle
;
28
class
QgsVectorTileMatrixSet
;
29
class
QgsLayerMetadata
;
30
37
class
CORE_EXPORT
QgsVtpkTiles
38
{
39
public
:
41
explicit
QgsVtpkTiles
(
const
QString &filename );
42
43
#ifndef SIP_RUN
44
QgsVtpkTiles
(
const
QgsVtpkTiles
&other ) =
delete
;
45
QgsVtpkTiles
&
operator=
(
const
QgsVtpkTiles
&other ) =
delete
;
46
#endif
47
~QgsVtpkTiles
();
48
50
bool
open
();
51
53
bool
isOpen
()
const
;
54
60
QVariantMap
metadata
()
const
;
61
65
QVariantMap
styleDefinition
()
const
;
66
70
QVariantMap
spriteDefinition
()
const
;
71
75
QImage
spriteImage
()
const
;
76
80
QgsLayerMetadata
layerMetadata
()
const
;
81
89
QVariantMap
rootTileMap
()
const
;
90
94
QgsVectorTileMatrixSet
matrixSet
()
const
;
95
99
QgsCoordinateReferenceSystem
crs
()
const
;
100
104
QgsRectangle
extent
(
const
QgsCoordinateTransformContext
&context )
const
;
105
114
QByteArray
tileData
(
int
z,
int
x,
int
y );
115
116
private
:
117
#ifdef SIP_RUN
118
QgsVtpkTiles
(
const
QgsVtpkTiles
&other );
119
#endif
120
121
QString mFilename;
122
struct
zip *mZip =
nullptr
;
123
mutable
QVariantMap mMetadata;
124
mutable
QgsVectorTileMatrixSet
mMatrixSet;
125
mutable
QString mTileMapPath;
126
mutable
bool
mHasReadTileMap =
false
;
127
mutable
QVariantMap mRootTileMap;
128
mutable
int
mPacketSize = -1;
129
};
130
131
132
#endif
// QGSVTPKTILES_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsLayerMetadata
A structured metadata store for a map layer.
Definition
qgslayermetadata.h:56
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
QgsVectorTileMatrixSet
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
Definition
qgsvectortilematrixset.h:31
QgsVtpkTiles::tileData
QByteArray tileData(int z, int x, int y)
Returns the raw tile data for the matching tile.
Definition
qgsvtpktiles.cpp:428
QgsVtpkTiles::extent
QgsRectangle extent(const QgsCoordinateTransformContext &context) const
Returns bounding box from metadata, given in the tiles crs().
Definition
qgsvtpktiles.cpp:404
QgsVtpkTiles::QgsVtpkTiles
QgsVtpkTiles(const QgsVtpkTiles &other)=delete
QgsVtpkTiles::isOpen
bool isOpen() const
Returns whether the VTPK file is currently opened.
Definition
qgsvtpktiles.cpp:85
QgsVtpkTiles::operator=
QgsVtpkTiles & operator=(const QgsVtpkTiles &other)=delete
QgsVtpkTiles::rootTileMap
QVariantMap rootTileMap() const
Returns the root tilemap content, if it exists.
Definition
qgsvtpktiles.cpp:342
QgsVtpkTiles::spriteDefinition
QVariantMap spriteDefinition() const
Returns the VTPK sprites definitions.
Definition
qgsvtpktiles.cpp:163
QgsVtpkTiles::crs
QgsCoordinateReferenceSystem crs() const
Returns the coordinate reference system of the tiles.
Definition
qgsvtpktiles.cpp:399
QgsVtpkTiles::layerMetadata
QgsLayerMetadata layerMetadata() const
Reads layer metadata from the VTPK file.
Definition
qgsvtpktiles.cpp:252
QgsVtpkTiles::open
bool open()
Tries to open the file, returns true on success.
Definition
qgsvtpktiles.cpp:50
QgsVtpkTiles::QgsVtpkTiles
QgsVtpkTiles(const QString &filename)
Constructs VTPK reader (but it does not open the file yet).
Definition
qgsvtpktiles.cpp:37
QgsVtpkTiles::matrixSet
QgsVectorTileMatrixSet matrixSet() const
Returns the vector tile matrix set representing the tiles.
Definition
qgsvtpktiles.cpp:390
QgsVtpkTiles::styleDefinition
QVariantMap styleDefinition() const
Returns the VTPK style definition.
Definition
qgsvtpktiles.cpp:129
QgsVtpkTiles::metadata
QVariantMap metadata() const
Returns the VTPK metadata.
Definition
qgsvtpktiles.cpp:90
QgsVtpkTiles::spriteImage
QImage spriteImage() const
Returns the VTPK sprite image, if it exists.
Definition
qgsvtpktiles.cpp:207
qgsvectortilematrixset.h
Generated on
for QGIS API Documentation by
1.17.0