QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsvectortilelayerrenderer.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectortilelayerrenderer.cpp
3  --------------------------------------
4  Date : March 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 
17 
18 #include <QElapsedTimer>
19 
21 #include "qgsfeedback.h"
22 #include "qgslogger.h"
23 
25 #include "qgsvectortilelayer.h"
26 #include "qgsvectortileloader.h"
27 #include "qgsvectortileutils.h"
28 
29 #include "qgslabelingengine.h"
30 #include "qgsvectortilelabeling.h"
31 #include "qgsmapclippingutils.h"
32 #include "qgsrendercontext.h"
33 
35  : QgsMapLayerRenderer( layer->id(), &context )
36  , mSourceType( layer->sourceType() )
37  , mSourcePath( layer->sourcePath() )
38  , mRenderer( layer->renderer()->clone() )
39  , mDrawTileBoundaries( layer->isTileBorderRenderingEnabled() )
40  , mFeedback( new QgsFeedback )
41  , mLayerOpacity( layer->opacity() )
42  , mTileMatrixSet( layer->tileMatrixSet() )
43 {
44 
45  QgsDataSourceUri dsUri;
46  dsUri.setEncodedUri( layer->source() );
47  mAuthCfg = dsUri.authConfigId();
48  mHeaders = dsUri.httpHeaders();
49 
50  if ( QgsLabelingEngine *engine = context.labelingEngine() )
51  {
52  if ( layer->labeling() )
53  {
54  mLabelProvider = layer->labeling()->provider( layer );
55  if ( mLabelProvider )
56  {
57  engine->addProvider( mLabelProvider );
58  }
59  }
60  }
61 
63 }
64 
66 {
68 
69  if ( ctx.renderingStopped() )
70  return false;
71 
72  const QgsScopedQPainterState painterState( ctx.painter() );
73 
74  if ( !mClippingRegions.empty() )
75  {
76  bool needsPainterClipPath = false;
77  const QPainterPath path = QgsMapClippingUtils::calculatePainterClipRegion( mClippingRegions, *renderContext(), QgsMapLayerType::VectorTileLayer, needsPainterClipPath );
78  if ( needsPainterClipPath )
79  renderContext()->painter()->setClipPath( path, Qt::IntersectClip );
80  }
81 
82  QElapsedTimer tTotal;
83  tTotal.start();
84 
85  const double tileRenderScale = mTileMatrixSet.scaleForRenderContext( ctx );
86  QgsDebugMsgLevel( QStringLiteral( "Vector tiles rendering extent: " ) + ctx.extent().toString( -1 ), 2 );
87  QgsDebugMsgLevel( QStringLiteral( "Vector tiles map scale 1 : %1" ).arg( tileRenderScale ), 2 );
88 
89  mTileZoom = mTileMatrixSet.scaleToZoomLevel( tileRenderScale );
90  QgsDebugMsgLevel( QStringLiteral( "Vector tiles zoom level: %1" ).arg( mTileZoom ), 2 );
91 
92  mTileMatrix = mTileMatrixSet.tileMatrix( mTileZoom );
93 
94  mTileRange = mTileMatrix.tileRangeFromExtent( ctx.extent() );
95  QgsDebugMsgLevel( QStringLiteral( "Vector tiles range X: %1 - %2 Y: %3 - %4" )
96  .arg( mTileRange.startColumn() ).arg( mTileRange.endColumn() )
97  .arg( mTileRange.startRow() ).arg( mTileRange.endRow() ), 2 );
98 
99  // view center is used to sort the order of tiles for fetching and rendering
100  const QPointF viewCenter = mTileMatrix.mapToTileCoordinates( ctx.extent().center() );
101 
102  if ( !mTileRange.isValid() )
103  {
104  QgsDebugMsgLevel( QStringLiteral( "Vector tiles - outside of range" ), 2 );
105  return true; // nothing to do
106  }
107 
108  const bool isAsync = ( mSourceType == QLatin1String( "xyz" ) );
109 
110  if ( mSourceType == QLatin1String( "xyz" ) && mSourcePath.contains( QLatin1String( "{usage}" ) ) )
111  {
112  switch ( renderContext()->rendererUsage() )
113  {
115  mSourcePath.replace( QLatin1String( "{usage}" ), QLatin1String( "view" ) );
116  break;
118  mSourcePath.replace( QLatin1String( "{usage}" ), QLatin1String( "export" ) );
119  break;
121  mSourcePath.replace( QLatin1String( "{usage}" ), QString() );
122  break;
123  }
124  }
125 
126  std::unique_ptr<QgsVectorTileLoader> asyncLoader;
127  QList<QgsVectorTileRawData> rawTiles;
128  if ( !isAsync )
129  {
130  QElapsedTimer tFetch;
131  tFetch.start();
132  rawTiles = QgsVectorTileLoader::blockingFetchTileRawData( mSourceType, mSourcePath, mTileMatrix, viewCenter, mTileRange, mAuthCfg, mHeaders, mFeedback.get() );
133  QgsDebugMsgLevel( QStringLiteral( "Tile fetching time: %1" ).arg( tFetch.elapsed() / 1000. ), 2 );
134  QgsDebugMsgLevel( QStringLiteral( "Fetched tiles: %1" ).arg( rawTiles.count() ), 2 );
135  }
136  else
137  {
138  asyncLoader.reset( new QgsVectorTileLoader( mSourcePath, mTileMatrix, mTileRange, viewCenter, mAuthCfg, mHeaders, mFeedback.get() ) );
139  QObject::connect( asyncLoader.get(), &QgsVectorTileLoader::tileRequestFinished, asyncLoader.get(), [this]( const QgsVectorTileRawData & rawTile )
140  {
141  QgsDebugMsgLevel( QStringLiteral( "Got tile asynchronously: " ) + rawTile.id.toString(), 2 );
142  if ( !rawTile.data.isEmpty() )
143  decodeAndDrawTile( rawTile );
144  } );
145  }
146 
147  if ( ctx.renderingStopped() )
148  return false;
149 
150  // add @zoom_level variable which can be used in styling
151  QgsExpressionContextScope *scope = new QgsExpressionContextScope( QObject::tr( "Tiles" ) ); // will be deleted by popper
152  scope->setVariable( QStringLiteral( "zoom_level" ), mTileZoom, true );
153  scope->setVariable( QStringLiteral( "vector_tile_zoom" ), mTileMatrixSet.scaleToZoom( tileRenderScale ), true );
154  const QgsExpressionContextScopePopper popper( ctx.expressionContext(), scope );
155 
156  mRenderer->startRender( *renderContext(), mTileZoom, mTileRange );
157 
158  QMap<QString, QSet<QString> > requiredFields = mRenderer->usedAttributes( ctx );
159 
160  if ( mLabelProvider )
161  {
162  const QMap<QString, QSet<QString> > requiredFieldsLabeling = mLabelProvider->usedAttributes( ctx, mTileZoom );
163  for ( auto it = requiredFieldsLabeling.begin(); it != requiredFieldsLabeling.end(); ++it )
164  {
165  requiredFields[it.key()].unite( it.value() );
166  }
167  }
168 
169  for ( auto it = requiredFields.constBegin(); it != requiredFields.constEnd(); ++it )
170  mPerLayerFields[it.key()] = QgsVectorTileUtils::makeQgisFields( it.value() );
171 
172  mRequiredLayers = mRenderer->requiredLayers( ctx, mTileZoom );
173 
174  if ( mLabelProvider )
175  {
176  mLabelProvider->setFields( mPerLayerFields );
177  QSet<QString> attributeNames; // we don't need this - already got referenced columns in provider constructor
178  if ( !mLabelProvider->prepare( ctx, attributeNames ) )
179  {
180  ctx.labelingEngine()->removeProvider( mLabelProvider );
181  mLabelProvider = nullptr; // provider is deleted by the engine
182  }
183  else
184  {
185  mRequiredLayers.unite( mLabelProvider->requiredLayers( ctx, mTileZoom ) );
186  }
187  }
188 
189  if ( !isAsync )
190  {
191  for ( const QgsVectorTileRawData &rawTile : std::as_const( rawTiles ) )
192  {
193  if ( ctx.renderingStopped() )
194  break;
195 
196  decodeAndDrawTile( rawTile );
197  }
198  }
199  else
200  {
201  // Block until tiles are fetched and rendered. If the rendering gets canceled at some point,
202  // the async loader will catch the signal, abort requests and return from downloadBlocking()
203  asyncLoader->downloadBlocking();
204  if ( !asyncLoader->error().isEmpty() )
205  mErrors.append( asyncLoader->error() );
206  }
207 
208  mRenderer->stopRender( ctx );
209 
210  QgsDebugMsgLevel( QStringLiteral( "Total time for decoding: %1" ).arg( mTotalDecodeTime / 1000. ), 2 );
211  QgsDebugMsgLevel( QStringLiteral( "Drawing time: %1" ).arg( mTotalDrawTime / 1000. ), 2 );
212  QgsDebugMsgLevel( QStringLiteral( "Total time: %1" ).arg( tTotal.elapsed() / 1000. ), 2 );
213 
214  return !ctx.renderingStopped();
215 }
216 
218 {
219  return renderContext()->testFlag( Qgis::RenderContextFlag::UseAdvancedEffects ) && ( !qgsDoubleNear( mLayerOpacity, 1.0 ) );
220 }
221 
222 void QgsVectorTileLayerRenderer::decodeAndDrawTile( const QgsVectorTileRawData &rawTile )
223 {
225 
226  QgsDebugMsgLevel( QStringLiteral( "Drawing tile " ) + rawTile.id.toString(), 2 );
227 
228  QElapsedTimer tLoad;
229  tLoad.start();
230 
231  // currently only MVT encoding supported
232  QgsVectorTileMVTDecoder decoder( mTileMatrixSet );
233  if ( !decoder.decode( rawTile.id, rawTile.data ) )
234  {
235  QgsDebugMsgLevel( QStringLiteral( "Failed to parse raw tile data! " ) + rawTile.id.toString(), 2 );
236  return;
237  }
238 
239  if ( ctx.renderingStopped() )
240  return;
241 
243 
244  QgsVectorTileRendererData tile( rawTile.id );
245  tile.setFields( mPerLayerFields );
246  tile.setFeatures( decoder.layerFeatures( mPerLayerFields, ct, &mRequiredLayers ) );
247 
248  try
249  {
250  tile.setTilePolygon( QgsVectorTileUtils::tilePolygon( rawTile.id, ct, mTileMatrix, ctx.mapToPixel() ) );
251  }
252  catch ( QgsCsException & )
253  {
254  QgsDebugMsgLevel( QStringLiteral( "Failed to generate tile polygon " ) + rawTile.id.toString(), 2 );
255  return;
256  }
257 
258  mTotalDecodeTime += tLoad.elapsed();
259 
260  // calculate tile polygon in screen coordinates
261 
262  if ( ctx.renderingStopped() )
263  return;
264 
265  {
266  // set up clipping so that rendering does not go behind tile's extent
267  const QgsScopedQPainterState savePainterState( ctx.painter() );
268  // we have to intersect with any existing painter clip regions, or we risk overwriting valid clip
269  // regions setup outside of the vector tile renderer (e.g. layout map clip region)
270  ctx.painter()->setClipRegion( QRegion( tile.tilePolygon() ), Qt::IntersectClip );
271 
272  QElapsedTimer tDraw;
273  tDraw.start();
274 
275  mRenderer->renderTile( tile, ctx );
276  mTotalDrawTime += tDraw.elapsed();
277  }
278 
279  if ( mLabelProvider )
280  mLabelProvider->registerTileFeatures( tile, ctx );
281 
282  if ( mDrawTileBoundaries )
283  {
284  const QgsScopedQPainterState savePainterState( ctx.painter() );
285  ctx.painter()->setClipping( false );
286 
287  QPen pen( Qt::red );
288  pen.setWidth( 3 );
289  QBrush brush( QColor( 255, 0, 0, 40 ), Qt::BrushStyle::Dense3Pattern );
290 
291  ctx.painter()->setPen( pen );
292  ctx.painter()->setBrush( brush );
293  ctx.painter()->drawPolygon( tile.tilePolygon() );
294 #if 0
295  ctx.painter()->setBrush( QBrush( QColor( 255, 0, 0 ) ) );
296  ctx.painter()->drawText( tile.tilePolygon().boundingRect().center(), tile.id().toString() );
297 #endif
298  }
299 }
QgsMapClippingUtils::collectClippingRegionsForLayer
static QList< QgsMapClippingRegion > collectClippingRegionsForLayer(const QgsRenderContext &context, const QgsMapLayer *layer)
Collects the list of map clipping regions from a context which apply to a map layer.
Definition: qgsmapclippingutils.cpp:24
qgsexpressioncontextutils.h
QgsExpressionContextScopePopper
RAII class to pop scope from an expression context on destruction.
Definition: qgsexpressioncontextutils.h:361
QgsDataSourceUri
Class for storing the component parts of a RDBMS data source URI (e.g. a Postgres data source).
Definition: qgsdatasourceuri.h:37
QgsVectorTileLayerRenderer::forceRasterRender
bool forceRasterRender() const override
Returns true if the renderer must be rendered to a raster paint device (e.g.
Definition: qgsvectortilelayerrenderer.cpp:217
QgsVectorTileLayer
Implements a map layer that is dedicated to rendering of vector tiles. Vector tiles compared to "ordi...
Definition: qgsvectortilelayer.h:84
QgsRenderContext::mapToPixel
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
Definition: qgsrendercontext.h:258
QgsExpressionContextScope::setVariable
void setVariable(const QString &name, const QVariant &value, bool isStatic=false)
Convenience method for setting a variable in the context scope by name name and value.
Definition: qgsexpressioncontext.cpp:83
QgsRenderContext::expressionContext
QgsExpressionContext & expressionContext()
Gets the expression context.
Definition: qgsrendercontext.h:625
QgsDebugMsgLevel
#define QgsDebugMsgLevel(str, level)
Definition: qgslogger.h:39
QgsRectangle::center
QgsPointXY center() const SIP_HOLDGIL
Returns the center point of the rectangle.
Definition: qgsrectangle.h:251
QgsLabelingEngine::removeProvider
void removeProvider(QgsAbstractLabelProvider *provider)
Remove provider if the provider's initialization failed. Provider instance is deleted.
Definition: qgslabelingengine.cpp:196
qgsvectortilelabeling.h
QgsRenderContext::rendererUsage
Qgis::RendererUsage rendererUsage() const
Returns the renderer usage.
Definition: qgsrendercontext.h:1000
QgsRenderContext::testFlag
bool testFlag(Qgis::RenderContextFlag flag) const
Check whether a particular flag is enabled.
Definition: qgsrendercontext.cpp:229
QgsVectorTileLayerRenderer::QgsVectorTileLayerRenderer
QgsVectorTileLayerRenderer(QgsVectorTileLayer *layer, QgsRenderContext &context)
Creates the renderer. Always called from main thread, should copy whatever necessary from the layer.
Definition: qgsvectortilelayerrenderer.cpp:34
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:59
QgsMapLayerRenderer::renderContext
QgsRenderContext * renderContext()
Returns the render context associated with the renderer.
Definition: qgsmaplayerrenderer.h:111
QgsVectorTileRendererData
Contains decoded features of a single vector tile and any other data necessary for rendering of it.
Definition: qgsvectortilerenderer.h:39
QgsTileMatrixSet::tileMatrix
QgsTileMatrix tileMatrix(int zoom) const
Returns the tile matrix corresponding to the specified zoom.
Definition: qgstiles.cpp:148
QgsRenderContext::extent
const QgsRectangle & extent() const
When rendering a map layer, calling this method returns the "clipping" extent for the layer (in the l...
Definition: qgsrendercontext.h:239
QgsVectorTileMVTDecoder
This class is responsible for decoding raw tile data written with Mapbox Vector Tiles encoding.
Definition: qgsvectortilemvtdecoder.h:38
QgsMapLayerRenderer
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Definition: qgsmaplayerrenderer.h:54
QgsVectorTileLabeling::provider
virtual QgsVectorTileLabelProvider * provider(QgsVectorTileLayer *layer) const SIP_SKIP
Factory for label provider implementation.
Definition: qgsvectortilelabeling.h:98
qgsvectortilelayer.h
Qgis::RendererUsage::Export
@ Export
Renderer used for printing or exporting to a file.
QgsRenderContext::renderingStopped
bool renderingStopped() const
Returns true if the rendering operation has been stopped and any ongoing rendering should be canceled...
Definition: qgsrendercontext.h:285
QgsRenderContext::coordinateTransform
QgsCoordinateTransform coordinateTransform() const
Returns the current coordinate transform for the context.
Definition: qgsrendercontext.h:178
QgsTileRange::endRow
int endRow() const
Returns index of the last row in the range.
Definition: qgstiles.h:87
QgsCsException
Custom exception class for Coordinate Reference System related exceptions.
Definition: qgsexception.h:65
QgsVectorTileLabelProvider::setFields
virtual void setFields(const QMap< QString, QgsFields > &perLayerFields)=0
Sets fields for each sub-layer.
QgsVectorTileLoader::tileRequestFinished
void tileRequestFinished(const QgsVectorTileRawData &rawTile)
Emitted when a tile request has finished. If a tile request has failed, the returned raw tile byte ar...
QgsVectorTileLoader::blockingFetchTileRawData
static QList< QgsVectorTileRawData > blockingFetchTileRawData(const QString &sourceType, const QString &sourcePath, const QgsTileMatrix &tileMatrix, const QPointF &viewCenter, const QgsTileRange &range, const QString &authid, const QgsHttpHeaders &headers, QgsFeedback *feedback=nullptr)
Returns raw tile data for the specified range of tiles. Blocks the caller until all tiles are fetched...
Definition: qgsvectortileloader.cpp:175
QgsVectorTileLabelProvider::usedAttributes
virtual QMap< QString, QSet< QString > > usedAttributes(const QgsRenderContext &context, int tileZoom) const =0
Returns field names for each sub-layer that are required for labeling.
QgsTileMatrixSet::scaleToZoomLevel
int scaleToZoomLevel(double scale) const
Finds the best fitting (integer) zoom level given a map scale denominator.
Definition: qgstiles.cpp:245
qgsvectortilemvtdecoder.h
QgsMapClippingUtils::calculatePainterClipRegion
static QPainterPath calculatePainterClipRegion(const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, QgsMapLayerType layerType, bool &shouldClip)
Returns a QPainterPath representing the intersection of clipping regions from context which should be...
Definition: qgsmapclippingutils.cpp:127
qgsDoubleNear
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
Definition: qgis.h:2265
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:44
QgsTileMatrix::tileRangeFromExtent
QgsTileRange tileRangeFromExtent(const QgsRectangle &mExtent) const
Returns tile range that fully covers the given extent.
Definition: qgstiles.cpp:97
qgsrendercontext.h
QgsMapLayerRenderer::mErrors
QStringList mErrors
Definition: qgsmaplayerrenderer.h:152
QgsVectorTileLabelProvider::requiredLayers
virtual QSet< QString > requiredLayers(QgsRenderContext &context, int tileZoom) const
Returns a list of the layers required for labeling.
Definition: qgsvectortilelabeling.h:53
QgsTileXYZ::toString
QString toString() const
Returns tile coordinates in a formatted string.
Definition: qgstiles.h:54
QgsVectorTileLoader
The loader class takes care of loading raw vector tile data from a tile source.
Definition: qgsvectortileloader.h:60
QgsTileMatrixSet::scaleForRenderContext
double scaleForRenderContext(const QgsRenderContext &context) const
Calculates the correct scale to use for the tiles when rendered using the specified render context.
Definition: qgstiles.cpp:261
QgsTileRange::isValid
bool isValid() const
Returns whether the range is valid (when all row/column numbers are not negative)
Definition: qgstiles.h:78
QgsTileRange::endColumn
int endColumn() const
Returns index of the last column in the range.
Definition: qgstiles.h:83
QgsScopedQPainterState
Scoped object for saving and restoring a QPainter object's state.
Definition: qgsrendercontext.h:1336
Qgis::RendererUsage::Unknown
@ Unknown
Renderer used for unknown usage.
QgsExpressionContextScope
Single scope for storing variables and functions for use within a QgsExpressionContext....
Definition: qgsexpressioncontext.h:113
QgsTileMatrixSet::scaleToZoom
double scaleToZoom(double scale) const
Calculates a fractional zoom level given a map scale denominator.
Definition: qgstiles.cpp:203
QgsLabelingEngine
The QgsLabelingEngine class provides map labeling functionality. The input for the engine is a list o...
Definition: qgslabelingengine.h:343
qgsvectortileloader.h
QgsRectangle::toString
QString toString(int precision=16) const
Returns a string representation of form xmin,ymin : xmax,ymax Coordinates will be truncated to the sp...
Definition: qgsrectangle.cpp:127
QgsRenderContext::labelingEngine
QgsLabelingEngine * labelingEngine() const
Gets access to new labeling engine (may be nullptr).
Definition: qgsrendercontext.h:368
QgsMapLayer::source
QString source() const
Returns the source for the layer.
Definition: qgsmaplayer.cpp:300
QgsTileRange::startRow
int startRow() const
Returns index of the first row in the range.
Definition: qgstiles.h:85
QgsVectorTileLabelProvider::registerTileFeatures
virtual void registerTileFeatures(const QgsVectorTileRendererData &tile, QgsRenderContext &context)=0
Registers label features for given tile to the labeling engine.
QgsDataSourceUri::setEncodedUri
void setEncodedUri(const QByteArray &uri)
Sets the complete encoded uri.
Definition: qgsdatasourceuri.cpp:636
QgsVectorTileLayer::labeling
QgsVectorTileLabeling * labeling() const
Returns currently assigned labeling.
Definition: qgsvectortilelayer.cpp:902
QgsTileMatrix::mapToTileCoordinates
QPointF mapToTileCoordinates(const QgsPointXY &mapPoint) const
Returns row/column coordinates (floating point number) from the given point in map coordinates.
Definition: qgstiles.cpp:121
QgsVectorTileRawData
Keeps track of raw tile data that need to be decoded.
Definition: qgsvectortileloader.h:32
qgsvectortilelayerrenderer.h
QgsMapLayerType::VectorTileLayer
@ VectorTileLayer
Vector tile layer. Added in QGIS 3.14.
qgsmapclippingutils.h
QgsVectorTileUtils::makeQgisFields
static QgsFields makeQgisFields(const QSet< QString > &flds)
Returns QgsFields instance based on the set of field names.
Definition: qgsvectortileutils.cpp:51
QgsVectorTileRawData::id
QgsTileXYZ id
Tile position in tile matrix set.
Definition: qgsvectortileloader.h:40
QgsDataSourceUri::authConfigId
QString authConfigId() const
Returns any associated authentication configuration ID stored in the URI.
Definition: qgsdatasourceuri.cpp:255
QgsVectorLayerLabelProvider::prepare
virtual bool prepare(QgsRenderContext &context, QSet< QString > &attributeNames)
Prepare for registration of features.
Definition: qgsvectorlayerlabelprovider.cpp:114
qgslogger.h
QgsRenderContext::painter
QPainter * painter()
Returns the destination QPainter for the render operation.
Definition: qgsrendercontext.h:112
qgsvectortileutils.h
Qgis::RendererUsage::View
@ View
Renderer used for displaying on screen.
QgsCoordinateTransform
Class for doing transforms between two map coordinate systems.
Definition: qgscoordinatetransform.h:57
qgsfeedback.h
Qgis::RenderContextFlag::UseAdvancedEffects
@ UseAdvancedEffects
Enable layer opacity and blending effects.
QgsVectorTileUtils::tilePolygon
static QPolygon tilePolygon(QgsTileXYZ id, const QgsCoordinateTransform &ct, const QgsTileMatrix &tm, const QgsMapToPixel &mtp)
Returns polygon (made by four corners of the tile) in screen coordinates.
Definition: qgsvectortileutils.cpp:36
qgslabelingengine.h
QgsTileRange::startColumn
int startColumn() const
Returns index of the first column in the range.
Definition: qgstiles.h:81
QgsVectorTileLayerRenderer::render
virtual bool render() override
Do the rendering (based on data stored in the class).
Definition: qgsvectortilelayerrenderer.cpp:65
QgsDataSourceUri::httpHeaders
QgsHttpHeaders httpHeaders() const
Returns http headers.
Definition: qgsdatasourceuri.h:345
QgsVectorTileRawData::data
QByteArray data
Raw tile data.
Definition: qgsvectortileloader.h:42