Class: QgsStacController¶
The QgsStacController class handles STAC requests.
Contains methods to generate STAC objects from local and remote urls.
Added in version 3.44.
Class Hierarchy¶
Base classes¶
- class qgis.core.QgsStacController[source]¶
Bases:
QObject- __init__()
Default constructor
- authCfg(self) str[source]¶
Returns the authentication config id which will be used during the request.
See also
- Return type:
str
- fetchCollections(self, url: QUrl, error: str | None | None = '') QgsStacCollectionList | None¶
Fetches collections from
urlusing a blocking network request. An optionalerrorparameter will be populated with any network error information. The caller takes ownership of the returned feature collection- Parameters:
url (QUrl)
error (Optional[Optional[str]] = '')
- Return type:
Optional[QgsStacCollectionList]
- fetchCollectionsAsync(self, url: QUrl) int[source]¶
Initiates an asynchronous request for a Collections collection using the
urland returns an associated request id. When the request is completed, thefinishedCollectionsRequest()signal is fired and the collections can be accessed withtakeCollections()Added in version 3.42.
- Parameters:
url (QUrl)
- Return type:
int
- fetchItemCollection(self, url: QUrl, error: str | None | None = '') QgsStacItemCollection | None¶
Fetches a feature collection from
urlusing a blocking network request. An optionalerrorparameter will be populated with any network error information. The caller takes ownership of the returned feature collection- Parameters:
url (QUrl)
error (Optional[Optional[str]] = '')
- Return type:
Optional[QgsStacItemCollection]
- fetchItemCollectionAsync(self, url: QUrl) int[source]¶
Initiates an asynchronous request for a feature collection using the
urland returns an associated request id. When the request is completed, thefinishedItemCollectionRequest()signal is fired and the feature collection can be accessed withtakeItemCollection()- Parameters:
url (QUrl)
- Return type:
int
- fetchStacObjectAsync(self, url: QUrl) int[source]¶
Initiates an asynchronous request for a STAC object using the
urland returns an associated request id. When the request is completed, thefinishedStacObjectRequest()signal is fired and the stac object can be accessed withtakeStacObject()- Parameters:
url (QUrl)
- Return type:
int
- signal finishedCollectionsRequest[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal finishedItemCollectionRequest[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal finishedStacObjectRequest[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- openLocalCatalog(self, fileName: str | None) QgsStacCatalog | None¶
Returns a STAC Catalog by parsing a local file The caller takes ownership of the returned catalog
- Parameters:
fileName (Optional[str])
- Return type:
Optional[QgsStacCatalog]
- openLocalCollection(self, fileName: str | None) QgsStacCollection | None¶
Returns a STAC Collection by parsing a local file The caller takes ownership of the returned collection
- Parameters:
fileName (Optional[str])
- Return type:
Optional[QgsStacCollection]
- openLocalItem(self, fileName: str | None) QgsStacItem | None¶
Returns a STAC Item by parsing a local file The caller takes ownership of the returned item
- Parameters:
fileName (Optional[str])
- Return type:
Optional[QgsStacItem]
- setAuthCfg(self, authCfg: str | None)[source]¶
Sets the authentication config id which should be used during the request.
See also
- Parameters:
authCfg (Optional[str])
- takeCollections(self, requestId: int) QgsStacCollectionList | None¶
Returns the collections collection fetched with the specified
requestIdIt should be used after the finishedCollectionsRequest signal is fired to get the fetched STAC collections. ReturnsNoneif the requestId was not found, request was canceled, request failed or parsing the STAC object failed. The caller takes ownership of the returned collectionsSee also
See also
Added in version 3.42.
- Parameters:
requestId (int)
- Return type:
Optional[QgsStacCollectionList]
- takeItemCollection(self, requestId: int) QgsStacItemCollection | None¶
Returns the feature collection fetched with the specified
requestIdIt should be used after the finishedItemCollectionRequest signal is fired to get the fetched STAC item collection. ReturnsNoneif the requestId was not found, request was canceled, request failed or parsing the STAC object failed. The caller takes ownership of the returned feature collectionSee also
See also
- Parameters:
requestId (int)
- Return type:
Optional[QgsStacItemCollection]