QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgsarcgisvectortileservicedataprovider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsarcgisvectortileservicedataprovider.h
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
16#ifndef QGSARCGISVECTORTILESERVICEDATAPROVIDER_H
17#define QGSARCGISVECTORTILESERVICEDATAPROVIDER_H
18
19#include "qgis_core.h"
20#include "qgis_sip.h"
22#include "qgsprovidermetadata.h"
23
24#define SIP_NO_FILE
25
27
28class CORE_EXPORT QgsArcGisVectorTileServiceDataProvider : public QgsXyzVectorTileDataProviderBase
29{
30 Q_OBJECT
31
32 public:
33 QgsArcGisVectorTileServiceDataProvider( const QString &uri,
34 const QgsDataProvider::ProviderOptions &providerOptions,
35 QgsDataProvider::ReadFlags flags );
36
37 QgsArcGisVectorTileServiceDataProvider( const QgsArcGisVectorTileServiceDataProvider &other );
38
42 QgsArcGisVectorTileServiceDataProvider &operator=( const QgsArcGisVectorTileServiceDataProvider &other ) = delete;
43
44 Qgis::VectorTileProviderFlags providerFlags() const override;
45 Qgis::VectorTileProviderCapabilities providerCapabilities() const override;
46 QString name() const override;
47 QString description() const override;
48 QgsVectorTileDataProvider *clone() const override;
49 QString sourcePath() const override;
50 bool isValid() const override;
51 QgsRectangle extent() const override;
52 const QgsVectorTileMatrixSet &tileMatrixSet() const override;
53 QgsCoordinateReferenceSystem crs() const override;
54 QgsLayerMetadata layerMetadata() const override;
55 QVariantMap styleDefinition() const override;
56 QString styleUrl() const override;
57 QString htmlMetadata() const override;
58
59 static QString ARCGIS_VT_SERVICE_DATA_PROVIDER_KEY;
60 static QString ARCGIS_VT_SERVICE_DATA_PROVIDER_DESCRIPTION;
61
62 private:
63
64 bool setupArcgisVectorTileServiceConnection();
65
66 bool mIsValid = false;
67 QgsRectangle mExtent;
68 QgsVectorTileMatrixSet mMatrixSet;
69
70 QString mSourcePath;
71
72 QVariantMap mArcgisLayerConfiguration;
73 QVariantMap mArcgisStyleConfiguration;
74
76
77 QgsLayerMetadata mLayerMetadata;
78 QString mTileMapUrl;
79};
80
81
82class QgsArcGisVectorTileServiceDataProviderMetadata : public QgsProviderMetadata
83{
84 Q_OBJECT
85 public:
86 QgsArcGisVectorTileServiceDataProviderMetadata();
87 QIcon icon() const override;
88 ProviderCapabilities providerCapabilities() const override;
89 QgsArcGisVectorTileServiceDataProvider *createProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() ) override;
90 QVariantMap decodeUri( const QString &uri ) const override;
91 QString encodeUri( const QVariantMap &parts ) const override;
92 QString absoluteToRelativeUri( const QString &uri, const QgsReadWriteContext &context ) const override;
93 QString relativeToAbsoluteUri( const QString &uri, const QgsReadWriteContext &context ) const override;
94 QList< Qgis::LayerType > supportedLayerTypes() const override;
95};
96
98
99#endif // QGSARCGISVECTORTILESERVICEDATAPROVIDER_H
This class represents a coordinate reference system (CRS).
A structured metadata store for a map layer.
Holds data provider key, description, and associated shared library file or function pointer informat...
virtual QgsProviderMetadata::ProviderCapabilities providerCapabilities() const
Returns the provider's capabilities.
virtual QIcon icon() const
Returns an icon representing the provider.
virtual QgsDataProvider * createProvider(const QString &uri, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags=QgsDataProvider::ReadFlags())
Class factory to return a pointer to a newly created QgsDataProvider object.
virtual QString encodeUri(const QVariantMap &parts) const
Reassembles a provider data source URI from its component paths (e.g.
virtual QString absoluteToRelativeUri(const QString &uri, const QgsReadWriteContext &context) const
Converts absolute path(s) to relative path(s) in the given provider-specific URI.
virtual QList< Qgis::LayerType > supportedLayerTypes() const
Returns a list of the map layer types supported by the provider.
virtual QString relativeToAbsoluteUri(const QString &uri, const QgsReadWriteContext &context) const
Converts relative path(s) to absolute path(s) in the given provider-specific URI.
virtual QVariantMap decodeUri(const QString &uri) const
Breaks a provider data source URI into its component paths (e.g.
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
Base class for vector tile layer data providers.
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
const QgsCoordinateReferenceSystem & crs
Setting options for creating vector data providers.