QGIS API Documentation 3.43.0-Master (69d1901085b)
|
Utility functions for querying ArcGIS REST services. More...
#include <qgsarcgisrestquery.h>
Public Types | |
enum class | ServiceTypeFilter { AllTypes , Vector , Raster } |
Service types. More... | |
Static Public Member Functions | |
static void | addLayerItems (const std::function< void(const QString &parentLayerId, ServiceTypeFilter serviceType, Qgis::GeometryType geometryType, const QString &layerId, const QString &name, const QString &description, const QString &url, bool isParentLayer, const QgsCoordinateReferenceSystem &crs, const QString &format)> &visitor, const QVariantMap &serviceData, const QString &parentUrl, const QString &parentSupportedFormats, const ServiceTypeFilter filter=ServiceTypeFilter::AllTypes) |
Calls the specified visitor function on all layer items found within the given service data. | |
static QgsRectangle | getExtent (const QString &layerurl, const QString &whereClause, const QString &authcfg, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), const QString &urlPrefix=QString()) |
Retrieves the extent for the features matching a whereClause. | |
static QVariantMap | getLayerInfo (const QString &layerurl, const QString &authcfg, QString &errorTitle, QString &errorText, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), const QString &urlPrefix=QString()) |
Retrieves JSON layer info for the specified layer URL. | |
static QVariantMap | getObjectIds (const QString &layerurl, const QString &authcfg, QString &errorTitle, QString &errorText, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), const QString &urlPrefix=QString(), const QgsRectangle &bbox=QgsRectangle(), const QString &whereClause=QString()) |
Retrieves all object IDs for the specified layer URL. | |
static QList< quint32 > | getObjectIdsByExtent (const QString &layerurl, const QgsRectangle &filterRect, QString &errorTitle, QString &errorText, const QString &authcfg, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr, const QString &whereClause=QString(), const QString &urlPrefix=QString()) |
Gets a list of object IDs which fall within the specified extent. | |
static QVariantMap | getObjects (const QString &layerurl, const QString &authcfg, const QList< quint32 > &objectIds, const QString &crs, bool fetchGeometry, const QStringList &fetchAttributes, bool fetchM, bool fetchZ, const QgsRectangle &filterRect, QString &errorTitle, QString &errorText, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr, const QString &urlPrefix=QString()) |
Retrieves all matching objects from the specified layer URL. | |
static QVariantMap | getServiceInfo (const QString &baseurl, const QString &authcfg, QString &errorTitle, QString &errorText, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), const QString &urlPrefix=QString()) |
Retrieves JSON service info for the specified base URL. | |
static QUrl | parseUrl (const QUrl &url, bool *isTestEndpoint=nullptr) |
Parses and processes a url. | |
static QByteArray | queryService (const QUrl &url, const QString &authcfg, QString &errorTitle, QString &errorText, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr, QString *contentType=nullptr, const QString &urlPrefix=QString()) |
Performs a blocking request to a URL and returns the retrieved data. | |
static QVariantMap | queryServiceJSON (const QUrl &url, const QString &authcfg, QString &errorTitle, QString &errorText, const QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr, const QString &urlPrefix=QString()) |
Performs a blocking request to a URL and returns the retrieved JSON content. | |
static void | visitFolderItems (const std::function< void(const QString &folderName, const QString &url)> &visitor, const QVariantMap &serviceData, const QString &baseUrl) |
Calls the specified visitor function on all folder items found within the given service data. | |
static void | visitServiceItems (const std::function< void(const QString &serviceName, const QString &url, Qgis::ArcGisRestServiceType serviceType)> &visitor, const QVariantMap &serviceData, const QString &baseUrl) |
Calls the specified visitor function on all service items found within the given service data. | |
Friends | |
class | TestQgsArcGisRestUtils |
Utility functions for querying ArcGIS REST services.
Definition at line 37 of file qgsarcgisrestquery.h.
|
strong |
Service types.
Enumerator | |
---|---|
AllTypes | All types. |
Vector | Vector type. |
Raster | Raster type. |
Definition at line 44 of file qgsarcgisrestquery.h.
|
static |
Calls the specified visitor function on all layer items found within the given service data.
Definition at line 379 of file qgsarcgisrestquery.cpp.
|
static |
Retrieves the extent for the features matching a whereClause.
Definition at line 74 of file qgsarcgisrestquery.cpp.
|
static |
Retrieves JSON layer info for the specified layer URL.
Definition at line 44 of file qgsarcgisrestquery.cpp.
|
static |
Retrieves all object IDs for the specified layer URL.
Definition at line 54 of file qgsarcgisrestquery.cpp.
|
static |
Gets a list of object IDs which fall within the specified extent.
Definition at line 140 of file qgsarcgisrestquery.cpp.
|
static |
Retrieves all matching objects from the specified layer URL.
layerurl | |
authcfg | |
objectIds | |
crs | override CRS for retrieved features. If empty, features will be retrieved in their original CRS (i.e. the original representation from the service). If set, then the service will be asked to transform the features from their original representation to the matching CRS. Since the exact transformation which will be used by the service is unknown, is it highly recommended to leave this argument empty and handle any transformations on the client (QGIS) side instead. The string must be value of the form "auth:code". Only the code portion will be used, and passed to the service as a integer only. It is assumed that the backend has the same CRS definition for the code as the proj database, and if this is not the case then an unexpected transformation will occur. |
fetchGeometry | |
fetchAttributes | |
fetchM | |
fetchZ | |
filterRect | |
errorTitle | |
errorText | |
requestHeaders | |
feedback | |
urlPrefix |
Definition at line 95 of file qgsarcgisrestquery.cpp.
|
static |
Retrieves JSON service info for the specified base URL.
Definition at line 34 of file qgsarcgisrestquery.cpp.
|
static |
Parses and processes a url.
Definition at line 244 of file qgsarcgisrestquery.cpp.
|
static |
Performs a blocking request to a URL and returns the retrieved data.
Definition at line 170 of file qgsarcgisrestquery.cpp.
|
static |
Performs a blocking request to a URL and returns the retrieved JSON content.
Definition at line 213 of file qgsarcgisrestquery.cpp.
|
static |
Calls the specified visitor function on all folder items found within the given service data.
Definition at line 318 of file qgsarcgisrestquery.cpp.
|
static |
Calls the specified visitor function on all service items found within the given service data.
Definition at line 337 of file qgsarcgisrestquery.cpp.
|
friend |
Definition at line 142 of file qgsarcgisrestquery.h.