|
QGIS API Documentation 4.3.0-Master (389d690bb77)
|
Handles STAC requests. More...
#include <qgsstaccontroller.h>

Signals | |
| void | finishedCollectionsRequest (int id, QString errorMessage) |
| This signal is fired when an async request initiated with fetchCollectionsAsync is finished. | |
| void | finishedItemCollectionRequest (int id, QString errorMessage) |
| This signal is fired when an async request initiated with fetchItemCollectionAsync is finished. | |
| void | finishedStacObjectRequest (int id, QString errorMessage) |
| This signal is fired when an async request initiated with fetchStacObjectAsync is finished. | |
Public Member Functions | |
| QgsStacController ()=default | |
| Default constructor. | |
| ~QgsStacController () override | |
| Default destructor. | |
| QString | authCfg () const |
| Returns the authentication config id which will be used during the request. | |
| void | cancelPendingAsyncRequests () |
| Cancels all pending async requests. | |
| std::unique_ptr< QgsStacCollectionList > | fetchCollections (const QUrl &url, QString *error=nullptr) |
| Fetches collections from url using a blocking network request. | |
| int | fetchCollectionsAsync (const QUrl &url) |
| Initiates an asynchronous request for a Collections collection using the url and returns an associated request id. | |
| std::unique_ptr< QgsStacItemCollection > | fetchItemCollection (const QUrl &url, QString *error=nullptr) |
| Fetches a feature collection from url using a blocking network request. | |
| int | fetchItemCollectionAsync (const QUrl &url) |
| Initiates an asynchronous request for a feature collection using the url and returns an associated request id. | |
| template<class T> | |
| std::unique_ptr< T > | fetchStacObject (const QUrl &url, QString *error=nullptr) |
| Fetches a STAC object from url using a blocking network request. | |
| int | fetchStacObjectAsync (const QUrl &url) |
| Initiates an asynchronous request for a STAC object using the url and returns an associated request id. | |
| std::unique_ptr< QgsStacCatalog > | openLocalCatalog (const QString &fileName) const |
| Returns a STAC Catalog by parsing a local file The caller takes ownership of the returned catalog. | |
| std::unique_ptr< QgsStacCollection > | openLocalCollection (const QString &fileName) const |
| Returns a STAC Collection by parsing a local file The caller takes ownership of the returned collection. | |
| std::unique_ptr< QgsStacItem > | openLocalItem (const QString &fileName) const |
| Returns a STAC Item by parsing a local file The caller takes ownership of the returned item. | |
| void | setAuthCfg (const QString &authCfg) |
| Sets the authentication config id which should be used during the request. | |
| std::unique_ptr< QgsStacCollectionList > | takeCollections (int requestId) |
| Returns the collections collection fetched with the specified requestId It should be used after the finishedCollectionsRequest signal is fired to get the fetched STAC collections. | |
| std::unique_ptr< QgsStacItemCollection > | takeItemCollection (int requestId) |
| Returns the feature collection fetched with the specified requestId It should be used after the finishedItemCollectionRequest signal is fired to get the fetched STAC item collection. | |
| template<class T> | |
| std::unique_ptr< T > | takeStacObject (int requestId) |
| Returns the STAC object fetched with the specified requestId. | |
Handles STAC requests.
Contains methods to generate STAC objects from local and remote urls.
Definition at line 45 of file qgsstaccontroller.h.
|
explicitdefault |
Default constructor.
|
override |
Default destructor.
Definition at line 37 of file qgsstaccontroller.cpp.
| QString QgsStacController::authCfg | ( | ) | const |
Returns the authentication config id which will be used during the request.
Definition at line 311 of file qgsstaccontroller.cpp.
| void QgsStacController::cancelPendingAsyncRequests | ( | ) |
Cancels all pending async requests.
Definition at line 69 of file qgsstaccontroller.cpp.
| std::unique_ptr< QgsStacCollectionList > QgsStacController::fetchCollections | ( | const QUrl & | url, |
| QString * | error = nullptr ) |
Fetches collections from url using a blocking network request.
An optional error parameter will be populated with any network error information. The caller takes ownership of the returned feature collection
Definition at line 274 of file qgsstaccontroller.cpp.
| int QgsStacController::fetchCollectionsAsync | ( | const QUrl & | url | ) |
Initiates an asynchronous request for a Collections collection using the url and returns an associated request id.
When the request is completed, the finishedCollectionsRequest() signal is fired and the collections can be accessed with takeCollections()
Definition at line 61 of file qgsstaccontroller.cpp.
| std::unique_ptr< QgsStacItemCollection > QgsStacController::fetchItemCollection | ( | const QUrl & | url, |
| QString * | error = nullptr ) |
Fetches a feature collection from url using a blocking network request.
An optional error parameter will be populated with any network error information. The caller takes ownership of the returned feature collection
Definition at line 249 of file qgsstaccontroller.cpp.
| int QgsStacController::fetchItemCollectionAsync | ( | const QUrl & | url | ) |
Initiates an asynchronous request for a feature collection using the url and returns an associated request id.
When the request is completed, the finishedItemCollectionRequest() signal is fired and the feature collection can be accessed with takeItemCollection()
Definition at line 53 of file qgsstaccontroller.cpp.
| template CORE_EXPORT std::unique_ptr< QgsStacCatalog > QgsStacController::fetchStacObject< QgsStacCatalog > | ( | const QUrl & | url, |
| QString * | error = nullptr ) |
Fetches a STAC object from url using a blocking network request.
An optional error parameter will be populated with any network error information. The caller takes ownership of the returned object
Definition at line 370 of file qgsstaccontroller.cpp.
| int QgsStacController::fetchStacObjectAsync | ( | const QUrl & | url | ) |
Initiates an asynchronous request for a STAC object using the url and returns an associated request id.
When the request is completed, the finishedStacObjectRequest() signal is fired and the stac object can be accessed with takeStacObject()
Definition at line 45 of file qgsstaccontroller.cpp.
|
signal |
This signal is fired when an async request initiated with fetchCollectionsAsync is finished.
The parsed STAC collections collection can be retrieved using takeCollections
| id | The requestId attribute of the finished request |
| errorMessage | Reason the request or parsing of the STAC collections may have failed |
|
signal |
This signal is fired when an async request initiated with fetchItemCollectionAsync is finished.
The parsed STAC item collection can be retrieved using takeItemCollection
| id | The requestId attribute of the finished request |
| errorMessage | Reason the request or parsing of the STAC item collection may have failed |
|
signal |
This signal is fired when an async request initiated with fetchStacObjectAsync is finished.
The parsed STAC object can be retrieved using takeStacObject
| id | The requestId attribute of the finished request |
| errorMessage | Reason the request or parsing of the STAC object may have failed |
| std::unique_ptr< QgsStacCatalog > QgsStacController::openLocalCatalog | ( | const QString & | fileName | ) | const |
Returns a STAC Catalog by parsing a local file The caller takes ownership of the returned catalog.
Definition at line 321 of file qgsstaccontroller.cpp.
| std::unique_ptr< QgsStacCollection > QgsStacController::openLocalCollection | ( | const QString & | fileName | ) | const |
Returns a STAC Collection by parsing a local file The caller takes ownership of the returned collection.
Definition at line 338 of file qgsstaccontroller.cpp.
| std::unique_ptr< QgsStacItem > QgsStacController::openLocalItem | ( | const QString & | fileName | ) | const |
Returns a STAC Item by parsing a local file The caller takes ownership of the returned item.
Definition at line 354 of file qgsstaccontroller.cpp.
| void QgsStacController::setAuthCfg | ( | const QString & | authCfg | ) |
Sets the authentication config id which should be used during the request.
Definition at line 316 of file qgsstaccontroller.cpp.
| std::unique_ptr< QgsStacCollectionList > QgsStacController::takeCollections | ( | int | requestId | ) |
Returns the collections collection fetched with the specified requestId It should be used after the finishedCollectionsRequest signal is fired to get the fetched STAC collections.
Returns nullptr if the requestId was not found, request was canceled, request failed or parsing the STAC object failed. The caller takes ownership of the returned collections
Definition at line 243 of file qgsstaccontroller.cpp.
| std::unique_ptr< QgsStacItemCollection > QgsStacController::takeItemCollection | ( | int | requestId | ) |
Returns the feature collection fetched with the specified requestId It should be used after the finishedItemCollectionRequest signal is fired to get the fetched STAC item collection.
Returns nullptr if the requestId was not found, request was canceled, request failed or parsing the STAC object failed. The caller takes ownership of the returned feature collection
Definition at line 237 of file qgsstaccontroller.cpp.
| template CORE_EXPORT std::unique_ptr< QgsStacObject > QgsStacController::takeStacObject< QgsStacObject > | ( | int | requestId | ) |
Returns the STAC object fetched with the specified requestId.
It should be used after the finishedStacObjectRequest signal is fired to get the fetched STAC object. Returns nullptr if the requestId was not found, request was canceled, request failed or parsing the STAC object failed. The caller takes ownership of the returned object
Definition at line 221 of file qgsstaccontroller.cpp.