QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
Random utility functions for working with vector tiles. More...
#include <qgsvectortileutils.h>
Static Public Member Functions | |
static bool | checkXYZUrlTemplate (const QString &url) |
Checks whether the URL template string is correct (contains {x}, {y} / {-y}, {z} placeholders) | |
static QString | formatXYZUrlTemplate (const QString &url, QgsTileXYZ tile, const QgsTileMatrix &tileMatrix) |
Returns formatted tile URL string replacing {x}, {y}, {z} placeholders (or {-y} instead of {y} for TMS convention) | |
static void | loadSprites (const QVariantMap &styleDefinition, QgsMapBoxGlStyleConversionContext &context, const QString &styleUrl=QString()) |
Downloads the sprite image and sets it to the conversion context. | |
static QgsFields | makeQgisFields (const QSet< QString > &flds) |
Returns QgsFields instance based on the set of field names. | |
static QgsVectorLayer * | makeVectorLayerForTile (QgsVectorTileLayer *mvt, QgsTileXYZ tileID, const QString &layerName) |
Returns a temporary vector layer for given sub-layer of tile in vector tile layer. | |
static double | scaleToZoom (double mapScale, double z0Scale=559082264.0287178) |
Finds zoom level given map scale denominator. | |
static int | scaleToZoomLevel (double mapScale, int sourceMinZoom, int sourceMaxZoom, double z0Scale=559082264.0287178) |
Finds the best fitting zoom level given a map scale denominator and allowed zoom level range. | |
static void | sortTilesByDistanceFromCenter (QVector< QgsTileXYZ > &tiles, QPointF center) |
Orders tile requests according to the distance from view center (given in tile matrix coords) | |
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. | |
Random utility functions for working with vector tiles.
Definition at line 47 of file qgsvectortileutils.h.
|
static |
Checks whether the URL template string is correct (contains {x}, {y} / {-y}, {z} placeholders)
Definition at line 146 of file qgsvectortileutils.cpp.
|
static |
Returns formatted tile URL string replacing {x}, {y}, {z} placeholders (or {-y} instead of {y} for TMS convention)
Definition at line 129 of file qgsvectortileutils.cpp.
|
static |
Downloads the sprite image and sets it to the conversion context.
styleDefinition | the style definition map |
context | the style conversion context |
styleUrl | optional the style url |
Definition at line 175 of file qgsvectortileutils.cpp.
|
static |
Returns QgsFields instance based on the set of field names.
Definition at line 55 of file qgsvectortileutils.cpp.
|
static |
Returns a temporary vector layer for given sub-layer of tile in vector tile layer.
Definition at line 87 of file qgsvectortileutils.cpp.
|
static |
Finds zoom level given map scale denominator.
The z0Scale argument gives the scale denominator at zoom level 0, where the default value corresponds to GoogleCRS84Quad tile matrix set
Definition at line 67 of file qgsvectortileutils.cpp.
|
static |
Finds the best fitting zoom level given a map scale denominator and allowed zoom level range.
The z0Scale argument gives the scale denominator at zoom level 0, where the default value corresponds to GoogleCRS84Quad tile matrix set.
Definition at line 75 of file qgsvectortileutils.cpp.
|
static |
Orders tile requests according to the distance from view center (given in tile matrix coords)
Definition at line 168 of file qgsvectortileutils.cpp.
|
static |
Returns polygon (made by four corners of the tile) in screen coordinates.
QgsCsException |
Definition at line 40 of file qgsvectortileutils.cpp.