Utility class for databases in MBTILES format.
More...
#include <MBTILES.h>
|
| static QSharedPointer< QFile > | openFileURL (const QString &fileName) |
| | Open file, file URL or Android content URL.
|
Utility class for databases in MBTILES format.
MBTILES contain tiled map data. Internally, MBTILES are SQLite databases whose schema is specified here: https://github.com/mapbox/mbtiles-spec This class handles MBTILES and allows easy access to the data.
Definition at line 40 of file MBTILES.h.
◆ Format
Format of data tiles.
| Enumerator |
|---|
| Unknown | Unknown format.
|
| Vector | Vector data in PBF format.
|
| Raster | Raster data in JPG, PNG or WEBP format.
|
Definition at line 45 of file MBTILES.h.
◆ MBTILES() [1/2]
| FileFormats::MBTILES::MBTILES |
( |
| ) |
|
Standard constructor.
Constructs an invalid object. The method tile() will return empty QByteArrays for this object.
◆ MBTILES() [2/2]
| FileFormats::MBTILES::MBTILES |
( |
const QString & | fileName | ) |
|
Standard constructor.
Constructs an object from an MBTILES file. The file is supposed to exist and remain intact throughout the existence of this class instance.
- Parameters
-
◆ attribution()
| QString FileFormats::MBTILES::attribution |
( |
| ) |
|
|
nodiscard |
Attribution of MBTILES file.
- Returns
- A human-readable HTML-String with attribution, or an empty string on error.
◆ fileName()
| QString FileFormats::MBTILES::fileName |
( |
| ) |
const |
|
inlinenodiscard |
Retrieve name of the MBTILES file.
- Returns
- Filename, as given in the constructor
Definition at line 135 of file MBTILES.h.
◆ format()
Determine type of data contained in an MBTILES file.
- Returns
- Type of data, or Unknown on error.
◆ info()
| QString FileFormats::MBTILES::info |
( |
| ) |
|
|
nodiscard |
Information about an MBTILES file.
- Returns
- A human-readable HTML-String with information about the MBTILES file, or an empty string on error.
◆ metaData()
| QMap< QString, QString > FileFormats::MBTILES::metaData |
( |
| ) |
const |
|
inlinenodiscard |
Retrieve metadata of the MBTILES file.
MBTILES files contain metadata, in the form of a list of key/value pairs.
- Returns
- A QMap containing the metadata, or an empty QMap on error.
Definition at line 126 of file MBTILES.h.
◆ tile()
| QByteArray FileFormats::MBTILES::tile |
( |
int | zoom, |
|
|
int | x, |
|
|
int | y ) |
|
nodiscard |
Retrieve tile from an MBTILES file.
- Parameters
-
| zoom | Zoom level of the tile |
| x | x-Coordinate of the tile |
| y | y-Coordinate of the tile |
- Returns
- A QByteArray with the tile data, or an empty QByteArray on error.
◆ tileSize()
| int FileFormats::MBTILES::tileSize |
( |
| ) |
|
|
nodiscard |
Retrieve tile size from an MBTILES file in raster format.
This method finds the size of the raster tiles in an MBTILES file.
- Returns
- A tile size (typically 256 or 512), or the default value 512 if the data is not available. The value returned is never negative.
The documentation for this class was generated from the following file:
- /home/runner/work/enroute/enroute/src/fileFormats/MBTILES.h