QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
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,
36
37 QgsArcGisVectorTileServiceDataProvider( const QgsArcGisVectorTileServiceDataProvider &other );
38
39 QgsArcGisVectorTileServiceDataProvider &operator=( const QgsArcGisVectorTileServiceDataProvider &other ) = delete;
40
41 Qgis::DataProviderFlags flags() const override;
42 Qgis::VectorTileProviderFlags providerFlags() const override;
43 Qgis::VectorTileProviderCapabilities providerCapabilities() const override;
44 QString name() const override;
45 QString description() const override;
46 QgsVectorTileDataProvider *clone() const override;
47 QString sourcePath() const override;
48 bool isValid() const override;
49 QgsRectangle extent() const override;
50 const QgsVectorTileMatrixSet &tileMatrixSet() const override;
51 QgsCoordinateReferenceSystem crs() const override;
52 QgsLayerMetadata layerMetadata() const override;
53 QVariantMap styleDefinition() const override;
54 QString styleUrl() const override;
55 QString htmlMetadata() const override;
56
57 static QString ARCGIS_VT_SERVICE_DATA_PROVIDER_KEY;
58 static QString ARCGIS_VT_SERVICE_DATA_PROVIDER_DESCRIPTION;
59
60 private:
61
62 bool setupArcgisVectorTileServiceConnection();
63
64 bool mIsValid = false;
65 QgsRectangle mExtent;
66 QgsVectorTileMatrixSet mMatrixSet;
67
68 QString mSourcePath;
69
70 QVariantMap mArcgisLayerConfiguration;
71 QVariantMap mArcgisStyleConfiguration;
72
74
75 QgsLayerMetadata mLayerMetadata;
76 QString mTileMapUrl;
77};
78
79
80class QgsArcGisVectorTileServiceDataProviderMetadata : public QgsProviderMetadata
81{
82 Q_OBJECT
83 public:
84 QgsArcGisVectorTileServiceDataProviderMetadata();
85 QIcon icon() const override;
86 ProviderCapabilities providerCapabilities() const override;
87 QgsArcGisVectorTileServiceDataProvider *createProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options, Qgis::DataProviderReadFlags flags = Qgis::DataProviderReadFlags() ) override;
88 QVariantMap decodeUri( const QString &uri ) const override;
89 QString encodeUri( const QVariantMap &parts ) const override;
90 QString absoluteToRelativeUri( const QString &uri, const QgsReadWriteContext &context ) const override;
91 QString relativeToAbsoluteUri( const QString &uri, const QgsReadWriteContext &context ) const override;
92 QList< Qgis::LayerType > supportedLayerTypes() const override;
93};
94
96
97#endif // QGSARCGISVECTORTILESERVICEDATAPROVIDER_H
QFlags< DataProviderFlag > DataProviderFlags
Data provider flags.
Definition qgis.h:2147
QFlags< DataProviderReadFlag > DataProviderReadFlags
Flags which control data provider construction.
Definition qgis.h:450
QFlags< VectorTileProviderCapability > VectorTileProviderCapabilities
Vector tile data provider capabilities.
Definition qgis.h:5188
QFlags< VectorTileProviderFlag > VectorTileProviderFlags
Vector tile data provider flags.
Definition qgis.h:5170
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 QgsDataProvider * createProvider(const QString &uri, const QgsDataProvider::ProviderOptions &options, Qgis::DataProviderReadFlags flags=Qgis::DataProviderReadFlags())
Class factory to return a pointer to a newly created QgsDataProvider object.
virtual QIcon icon() const
Returns an icon representing the provider.
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.