Class: QgsStacAsset

Class for storing a STAC asset’s data.

Added in version 3.44.

class qgis.core.QgsStacAsset[source]

Bases: object

__init__(href: str | None, title: str | None, description: str | None, mediaType: str | None, roles: Iterable[str | None])

Constructor

Parameters:
  • href (Optional[str])

  • title (Optional[str])

  • description (Optional[str])

  • mediaType (Optional[str])

  • roles (Iterable[Optional[str]])

__init__(a0: QgsStacAsset)
Parameters:

a0 (QgsStacAsset)

description(self) str[source]

Returns a description of the Asset providing additional details, such as how it was processed or created. CommonMark 0.29 syntax MAY be used for rich text representation.

Return type:

str

formatName(self) str[source]

Returns the format name for cloud optimized formats

Added in version 3.42.

Return type:

str

href(self) str[source]

Returns the URI to the asset object

Return type:

str

isCloudOptimized(self) bool[source]

Returns whether the asset is in a cloud optimized format like COG or COPC

Added in version 3.42.

Return type:

bool

isDownloadable(self) bool[source]

Returns whether the asset can be downloaded.

Added in version 4.0.

Return type:

bool

mediaType(self) str[source]

Returns the media type of the asset

Return type:

str

roles(self) List[str][source]

Returns the roles assigned to the asset. Roles are used to describe the purpose of the asset (eg. thumbnail, data etc).

Return type:

List[str]

title(self) str[source]

Returns the displayed title for clients and users.

Return type:

str

toHtml(self, assetId: str | None) str[source]

Returns an HTML representation of the STAC Asset including its ID within its container

Added in version 4.0.

Parameters:

assetId (Optional[str])

Return type:

str

uri(self, authcfg: str | None = '') QgsMimeDataUtils.Uri[source]

Returns a uri for the asset if it is a cloud optimized file like COG or COPC.

Parameters:

authcfg (Optional[str] = '') – Optional authentication configuration ID (since QGIS 4.0).

If the optional @authcfg parameter is set the authentication configuration ID will be encoded in the returned URI.

Added in version 3.42.

Return type:

QgsMimeDataUtils.Uri