QGIS API Documentation 4.3.0-Master (389d690bb77)
Loading...
Searching...
No Matches
QgsStacItem Class Reference

Stores data associated with a STAC Item. More...

#include <qgsstacitem.h>

Inheritance diagram for QgsStacItem:

Public Member Functions

 QgsStacItem ()=delete
 Default constructor deleted, use the variant with required parameters.
 QgsStacItem (const QString &id, const QString &version, const QgsGeometry &geometry, const QVariantMap &properties, const QVector< QgsStacLink > &links, const QMap< QString, QgsStacAsset > &assets, const QgsBox3D &bbox)
 Constructs a valid QgsStacItem.
QMap< QString, QgsStacAssetassets () const
 Returns a dictionary of asset objects, each with a unique key.
QgsBox3D boundingBox () const
 Returns the STAC item's spatial extent in WGS84 coordinates.
QString collection () const
 Returns the id of the STAC Collection this Item references to.
QDateTime dateTime () const
 Returns the single nominal date/time for the item, stored in the item's properties().
QgsDateTimeRange dateTimeRange () const
 Returns the temporal interval stored in the item's properties().
QString description () const
 Returns a Detailed multi-line description to fully explain the Item.
QgsGeometry geometry () const
 Returns the full footprint of the asset represented by this item, in WGS84.
bool hasDateTimeRange () const
 Returns true if a temporal interval is available for this item, false if a single QDateTime is available.
QVariantMap properties () const
 Returns a dictionary of additional metadata for the Item.
void setAssets (const QMap< QString, QgsStacAsset > &assets)
 Sets the asset objects, each with a unique key.
void setBoundingBox (const QgsBox3D &bbox)
 Sets the STAC item's spatial extent in WGS84 coordinates to bbox.
void setCollection (const QString &collection)
 Sets the id of the STAC Collection this Item references to.
void setGeometry (const QgsGeometry &geometry)
 Sets the full footprint of the asset represented by this item, in WGS84.
void setProperties (const QVariantMap &properties)
 Sets the item's additional metadata to properties.
QString title () const
 Returns an optional human readable title describing the Item.
QString toHtml () const override
 Returns an HTML representation of the STAC object.
Qgis::StacObjectType type () const override
 Returns the Type of the STAC object.
QgsMimeDataUtils::UriList uris () const
 Returns a list of uris of all assets that have a cloud optimized format like COG or COPC.
Public Member Functions inherited from QgsStacObject
 QgsStacObject ()=delete
 Default constructor is used for creating invalid objects.
 QgsStacObject (const QString &id, const QString &version, const QVector< QgsStacLink > &links)
 Constructor for valid objects.
virtual ~QgsStacObject ()=default
 Destructor.
QString id () const
 Id of the STAC object.
QVector< QgsStacLinklinks () const
 Returns the STAC links included in the object.
QString parentUrl () const
 Returns the url stored in the object's "parent" link.
QString rootUrl () const
 Returns the url stored in the object's "root" link.
void setId (const QString &id)
 Sets the id for the STAC object.
void setLinks (const QVector< QgsStacLink > &links)
 Sets the STAC links included in the object.
void setStacExtensions (const QStringList &stacExtensions)
 Sets the list of stacExtensions the object implements.
void setStacVersion (const QString &stacVersion)
 Sets the STAC version the object implements.
QStringList stacExtensions () const
 Returns the list of extensions the STAC object implements.
QString stacVersion () const
 Returns the STAC version the object implements.
QString url () const
 Returns the url stored in the object's "self" link.

Additional Inherited Members

Protected Attributes inherited from QgsStacObject
QString mId
QVector< QgsStacLinkmLinks
QStringList mStacExtensions
QString mStacVersion
Qgis::StacObjectType mType = Qgis::StacObjectType::Unknown

Detailed Description

Stores data associated with a STAC Item.

Since
QGIS 3.44

Definition at line 34 of file qgsstacitem.h.

Constructor & Destructor Documentation

◆ QgsStacItem() [1/2]

QgsStacItem::QgsStacItem ( )
delete

Default constructor deleted, use the variant with required parameters.

◆ QgsStacItem() [2/2]

QgsStacItem::QgsStacItem ( const QString & id,
const QString & version,
const QgsGeometry & geometry,
const QVariantMap & properties,
const QVector< QgsStacLink > & links,
const QMap< QString, QgsStacAsset > & assets,
const QgsBox3D & bbox )

Constructs a valid QgsStacItem.

Parameters
idProvider identifier. The ID should be unique within the Collection that contains the Item.
versionThe STAC version the Item implements.
geometryThe full footprint of the asset represented by this item, in WGS84
propertiesA dictionary of additional metadata for the Item.
linksList of link objects to resources and related URLs.
assetsDictionary of asset objects that can be downloaded, each with a unique key.
bboxBounding Box of the asset represented by this Item. Required if geometry is not null

Definition at line 22 of file qgsstacitem.cpp.

Member Function Documentation

◆ assets()

QMap< QString, QgsStacAsset > QgsStacItem::assets ( ) const

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

Definition at line 130 of file qgsstacitem.cpp.

◆ boundingBox()

QgsBox3D QgsStacItem::boundingBox ( ) const

Returns the STAC item's spatial extent in WGS84 coordinates.

Definition at line 110 of file qgsstacitem.cpp.

◆ collection()

QString QgsStacItem::collection ( ) const

Returns the id of the STAC Collection this Item references to.

Definition at line 140 of file qgsstacitem.cpp.

◆ dateTime()

QDateTime QgsStacItem::dateTime ( ) const

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
hasDateTimeRange()
dateTimeRange()

Definition at line 150 of file qgsstacitem.cpp.

◆ dateTimeRange()

QgsDateTimeRange QgsStacItem::dateTimeRange ( ) const

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

See also
hasDateTimeRange()
dateTime()

Definition at line 160 of file qgsstacitem.cpp.

◆ description()

QString QgsStacItem::description ( ) const

Returns a Detailed multi-line description to fully explain the Item.

CommonMark 0.29 syntax may be used for rich text representation.

Since
QGIS 3.42

Definition at line 172 of file qgsstacitem.cpp.

◆ geometry()

QgsGeometry QgsStacItem::geometry ( ) const

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

Definition at line 100 of file qgsstacitem.cpp.

◆ hasDateTimeRange()

bool QgsStacItem::hasDateTimeRange ( ) const

Returns true if a temporal interval is available for this item, false if a single QDateTime is available.

See also
hasDateTimeRange()
dateTime()

Definition at line 155 of file qgsstacitem.cpp.

◆ properties()

QVariantMap QgsStacItem::properties ( ) const

Returns a dictionary of additional metadata for the Item.

Definition at line 120 of file qgsstacitem.cpp.

◆ setAssets()

void QgsStacItem::setAssets ( const QMap< QString, QgsStacAsset > & assets)

Sets the asset objects, each with a unique key.

Definition at line 135 of file qgsstacitem.cpp.

◆ setBoundingBox()

void QgsStacItem::setBoundingBox ( const QgsBox3D & bbox)

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

Definition at line 115 of file qgsstacitem.cpp.

◆ setCollection()

void QgsStacItem::setCollection ( const QString & collection)

Sets the id of the STAC Collection this Item references to.

Definition at line 145 of file qgsstacitem.cpp.

◆ setGeometry()

void QgsStacItem::setGeometry ( const QgsGeometry & geometry)

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

Definition at line 105 of file qgsstacitem.cpp.

◆ setProperties()

void QgsStacItem::setProperties ( const QVariantMap & properties)

Sets the item's additional metadata to properties.

Definition at line 125 of file qgsstacitem.cpp.

◆ title()

QString QgsStacItem::title ( ) const

Returns an optional human readable title describing the Item.

Since
QGIS 3.42

Definition at line 167 of file qgsstacitem.cpp.

◆ toHtml()

QString QgsStacItem::toHtml ( ) const
overridevirtual

Returns an HTML representation of the STAC object.

Implements QgsStacObject.

Definition at line 37 of file qgsstacitem.cpp.

◆ type()

Qgis::StacObjectType QgsStacItem::type ( ) const
overridevirtual

Returns the Type of the STAC object.

Implements QgsStacObject.

Definition at line 32 of file qgsstacitem.cpp.

◆ uris()

QgsMimeDataUtils::UriList QgsStacItem::uris ( ) const

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

Since
QGIS 3.42

Definition at line 177 of file qgsstacitem.cpp.


The documentation for this class was generated from the following files: