QGIS API Documentation
3.14.0-Pi (9f7028fd23)
src
core
qgsmbtiles.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmbtiles.h
3
--------------------------------------
4
Date : January 2020
5
Copyright : (C) 2020 by Martin Dobias
6
Email : wonder dot sk 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 QGSMBTILES_H
17
#define QGSMBTILES_H
18
19
#include "qgis_core.h"
20
21
#include "sqlite3.h"
22
#include "
qgssqliteutils.h
"
23
24
#define SIP_NO_FILE
25
26
class
QImage;
27
class
QgsRectangle
;
28
38
class
CORE_EXPORT
QgsMbTiles
39
{
40
public
:
42
explicit
QgsMbTiles
(
const
QString &filename );
43
45
bool
open();
46
48
bool
isOpen()
const
;
49
55
bool
create();
56
58
QString metadataValue(
const
QString &key );
59
64
void
setMetadataValue(
const
QString &key,
const
QString &value );
65
67
QgsRectangle
extent();
68
70
QByteArray tileData(
int
z,
int
x,
int
y );
71
73
QImage tileDataAsImage(
int
z,
int
x,
int
y );
74
79
void
setTileData(
int
z,
int
x,
int
y,
const
QByteArray &data );
80
82
static
bool
decodeGzip(
const
QByteArray &bytesIn, QByteArray &bytesOut );
84
static
bool
encodeGzip(
const
QByteArray &bytesIn, QByteArray &bytesOut );
85
86
private
:
87
QString mFilename;
88
sqlite3_database_unique_ptr
mDatabase;
89
};
90
91
92
#endif // QGSMBTILES_H
QgsRectangle
Definition:
qgsrectangle.h:41
QgsMbTiles
Definition:
qgsmbtiles.h:38
qgssqliteutils.h
sqlite3_database_unique_ptr
Definition:
qgssqliteutils.h:118
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17