QGIS API Documentation 3.39.0-Master (67e056379ed)
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
42 QgsArcGisVectorTileServiceDataProvider &operator=( const QgsArcGisVectorTileServiceDataProvider &other ) = delete;
43
44 Qgis::DataProviderFlags flags() const override;
45 Qgis::VectorTileProviderFlags providerFlags() const override;
46 Qgis::VectorTileProviderCapabilities providerCapabilities() const override;
47 QString name() const override;
48 QString description() const override;
49 QgsVectorTileDataProvider *clone() const override;
50 QString sourcePath() const override;
51 bool isValid() const override;
52 QgsRectangle extent() const override;
53 const QgsVectorTileMatrixSet &tileMatrixSet() const override;
54 QgsCoordinateReferenceSystem crs() const override;
55 QgsLayerMetadata layerMetadata() const override;
56 QVariantMap styleDefinition() const override;
57 QString styleUrl() const override;
58 QString htmlMetadata() const override;
59
60 static QString ARCGIS_VT_SERVICE_DATA_PROVIDER_KEY;
61 static QString ARCGIS_VT_SERVICE_DATA_PROVIDER_DESCRIPTION;
62
63 private:
64
65 bool setupArcgisVectorTileServiceConnection();
66
67 bool mIsValid = false;
68 QgsRectangle mExtent;
69 QgsVectorTileMatrixSet mMatrixSet;
70
71 QString mSourcePath;
72
73 QVariantMap mArcgisLayerConfiguration;
74 QVariantMap mArcgisStyleConfiguration;
75
77
78 QgsLayerMetadata mLayerMetadata;
79 QString mTileMapUrl;
80};
81
82
83class QgsArcGisVectorTileServiceDataProviderMetadata : public QgsProviderMetadata
84{
85 Q_OBJECT
86 public:
87 QgsArcGisVectorTileServiceDataProviderMetadata();
88 QIcon icon() const override;
89 ProviderCapabilities providerCapabilities() const override;
90 QgsArcGisVectorTileServiceDataProvider *createProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() ) override;
91 QVariantMap decodeUri( const QString &uri ) const override;
92 QString encodeUri( const QVariantMap &parts ) const override;
93 QString absoluteToRelativeUri( const QString &uri, const QgsReadWriteContext &context ) const override;
94 QString relativeToAbsoluteUri( const QString &uri, const QgsReadWriteContext &context ) const override;
95 QList< Qgis::LayerType > supportedLayerTypes() const override;
96};
97
99
100#endif // QGSARCGISVECTORTILESERVICEDATAPROVIDER_H
QFlags< DataProviderFlag > DataProviderFlags
Data provider flags.
Definition qgis.h:1950
QFlags< VectorTileProviderCapability > VectorTileProviderCapabilities
Vector tile data provider capabilities.
Definition qgis.h:4757
QFlags< VectorTileProviderFlag > VectorTileProviderFlags
Vector tile data provider flags.
Definition qgis.h:4739
This class represents a coordinate reference system (CRS).
QFlags< ReadFlag > ReadFlags
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.