16 #ifndef QGSVECTORTILEWRITER_H
17 #define QGSVECTORTILEWRITER_H
19 #include <QCoreApplication>
120 QString mFilterExpression;
144 void setLayers(
const QList<QgsVectorTileWriter::Layer> &layers ) { mLayers = layers; }
147 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
164 bool writeTiles(
QgsFeedback *feedback =
nullptr );
187 QByteArray writeSingleTile(
QgsTileXYZ tileID,
QgsFeedback *feedback =
nullptr,
int buffer = 256,
int resolution = 4096 )
const;
190 bool writeTileFileXYZ(
const QString &sourcePath,
QgsTileXYZ tileID,
const QgsTileMatrix &tileMatrix,
const QByteArray &tileData );
191 QString mbtilesJsonSchema();
198 QList<Layer> mLayers;
199 QString mDestinationUri;
200 QVariantMap mMetadata;
203 QString mErrorMessage;
Contains information about the context in which a coordinate transform is executed.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A rectangle specified with double values.
Defines a matrix of tiles for a single zoom level: it is defined by its size (width *.
Stores coordinates of a tile in a tile matrix set.
Represents a vector layer which manages a vector based data sets.
Configuration of a single input vector layer to be included in the output.
QString layerName() const
Returns layer name in the output. If not set, layer()->name() will be used.
Layer(QgsVectorLayer *layer)
Constructs an entry for a vector layer.
QgsVectorLayer * layer() const
Returns vector layer of this entry.
void setLayerName(const QString &name)
Sets layer name in the output. If not set, layer()->name() will be used.
void setMaxZoom(int maxzoom)
Sets maximum zoom level at which this layer will be used. Negative value means no max....
void setFilterExpression(const QString &expr)
Sets filter expression. If not empty, only features matching the expression will be used.
void setMinZoom(int minzoom)
Sets minimum zoom level at which this layer will be used. Negative value means no min....
QString filterExpression() const
Returns filter expression. If not empty, only features matching the expression will be used.
int maxZoom() const
Returns maximum zoom level at which this layer will be used. Negative value means no max....
int minZoom() const
Returns minimum zoom level at which this layer will be used. Negative value means no min....
Takes care of writing vector tiles.
QString errorMessage() const
Returns error message related to the previous call to writeTiles().
void setMaxZoom(int maxZoom)
Sets the maximum zoom level of tiles. Allowed values are in interval [0,24].
void setDestinationUri(const QString &uri)
Sets where and how the vector tiles will be written.
void setTransformContext(const QgsCoordinateTransformContext &transformContext)
Sets coordinate transform context for transforms between layers and tile matrix CRS.
void setExtent(const QgsRectangle &extent)
Sets extent of vector tile output.
void setLayers(const QList< QgsVectorTileWriter::Layer > &layers)
Sets vector layers and their configuration for output of vector tiles.
void setMinZoom(int minZoom)
Sets the minimum zoom level of tiles. Allowed values are in interval [0,24].
void setMetadata(const QVariantMap &metadata)
Sets that will be written to the output dataset. See class description for more on metadata support.