Class: QgsStacItem

Class for storing a STAC Item’s data.

Added in version 3.44.

Class Hierarchy

Inheritance diagram of qgis.core.QgsStacItem

Base classes

QgsStacObject

Abstract base class for storing STAC objects.

class qgis.core.QgsStacItem[source]

Bases: QgsStacObject

__init__(id: str | None, version: str | None, geometry: QgsGeometry, properties: Dict[str, Any], links: Iterable[QgsStacLink], assets: Dict[str | None, QgsStacAsset], bbox: QgsBox3D)

Constructs a valid QgsStacItem

Parameters:
  • id (Optional[str]) – Provider identifier. The ID should be unique within the Collection that contains the Item.

  • version (Optional[str]) – The STAC version the Item implements.

  • geometry (QgsGeometry) – The full footprint of the asset represented by this item, in WGS84

  • properties (Dict[str, Any]) – A dictionary of additional metadata for the Item.

  • links (Iterable[QgsStacLink]) – List of link objects to resources and related URLs.

  • assets (Dict[Optional[str], QgsStacAsset]) – Dictionary of asset objects that can be downloaded, each with a unique key.

  • bbox (QgsBox3D) – Bounding Box of the asset represented by this Item. Required if geometry is not null

__init__(a0: QgsStacItem)
Parameters:

a0 (QgsStacItem)

assets(self) Dict[str, QgsStacAsset]

Returns a dictionary of asset objects, each with a unique key.

Return type:

Dict[str, QgsStacAsset]

boundingBox(self) QgsBox3D[source]

Returns the STAC item’s spatial extent in WGS84 coordinates

Return type:

QgsBox3D

collection(self) str[source]

Returns the id of the STAC Collection this Item references to

Return type:

str

dateTime(self) QDateTime[source]

Returns the single nominal date/time for the item, stored in the item’s properties().

If a temporal interval is more appropriate for this item then a null QDateTime is returned and the interval may be retrieved with dateTimeRange().

See also

dateTimeRange()

Return type:

QDateTime

dateTimeRange(self) QgsDateTimeRange[source]

Returns the temporal interval stored in the item’s properties().

See also

dateTime()

Return type:

QgsDateTimeRange

description(self) str[source]

Returns a Detailed multi-line description to fully explain the Item. CommonMark 0.29 syntax may be used for rich text representation.

Added in version 3.42.

Return type:

str

geometry(self) QgsGeometry[source]

Returns the full footprint of the asset represented by this item, in WGS84

Return type:

QgsGeometry

hasDateTimeRange(self) bool[source]

Returns True if a temporal interval is available for this item, False if a single QDateTime is available.

See also

dateTime()

Return type:

bool

properties(self) Dict[str, Any][source]

Returns a dictionary of additional metadata for the Item.

Return type:

Dict[str, Any]

setAssets(self, assets: Dict[str | None, QgsStacAsset])[source]

Sets the asset objects, each with a unique key.

Parameters:

assets (Dict[Optional[str], QgsStacAsset])

setBoundingBox(self, bbox: QgsBox3D)[source]

Sets the STAC item’s spatial extent in WGS84 coordinates to bbox

Parameters:

bbox (QgsBox3D)

setCollection(self, collection: str | None)[source]

Sets the id of the STAC Collection this Item references to

Parameters:

collection (Optional[str])

setGeometry(self, geometry: QgsGeometry)[source]

Sets the full footprint of the asset represented by this item, in WGS84

Parameters:

geometry (QgsGeometry)

setProperties(self, properties: Dict[str, Any])[source]

Sets the item’s additional metadata to properties

Parameters:

properties (Dict[str, Any])

title(self) str[source]

Returns an optional human readable title describing the Item.

Added in version 3.42.

Return type:

str

uris(self) List[QgsMimeDataUtils.Uri][source]

Returns a list of uris of all assets that have a cloud optimized format like COG or COPC

Added in version 3.42.

Return type:

List[QgsMimeDataUtils.Uri]