Class: QgsStacItemCollection

Class for storing a STAC Item Collections.

An Item Collection is typically returned by STAP API endpoints and contains a subset of the STAC Items available in a STAC Catalog or Collection.

Added in version 3.44.

class qgis.core.QgsStacItemCollection[source]

Bases: object

__init__(items: Iterable[QgsStacItem], links: Iterable[QgsStacLink], numberMatched: int = -1)

Constructs a valid item collection

Parameters:
  • items (Iterable[QgsStacItem]) – The STAC Items in the item collection, ownership is transferred

  • links (Iterable[QgsStacLink]) – A list of references to other documents.

  • numberMatched (int = -1) – The total number of items in the parent catalog, collection or total matching results from a STAC API endpoint

Note

ownership of items is transferred. Items will be deleted when object is destroyed.

collectionUrl(self) QUrl[source]

Returns the url of the item collection’s “collection” link

Return type:

QUrl

items(self) List[QgsStacItem]

Returns the items in the collection Ownership is not transferred

Return type:

List[QgsStacItem]

nextUrl(self) QUrl[source]

Returns the url of the item collection’s “next” link

Return type:

QUrl

numberMatched(self) int[source]

Returns the total number of items in the parent collection If this information was not available by the STAC server, -1 is returned

Return type:

int

numberReturned(self) int[source]

Returns the number of items in the collection

Return type:

int

parentUrl(self) QUrl[source]

Returns the url of the item collection’s “parent” link

Return type:

QUrl

rootUrl(self) QUrl[source]

Returns the url of the item collection’s “root” link

Return type:

QUrl

takeItems(self) List[QgsStacItem]

Returns the items in the collection Caller takes ownership of the returned items

Return type:

List[QgsStacItem]

url(self) QUrl[source]

Returns the url of the item collection’s “self” link

Return type:

QUrl