QGIS API Documentation 4.3.0-Master (389d690bb77)
Loading...
Searching...
No Matches
qgsstacitem.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsstacitem.h
3 ---------------------
4 begin : August 2024
5 copyright : (C) 2024 by Stefanos Natsis
6 email : uclaros at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSSTACITEM_H
17#define QGSSTACITEM_H
18
19#include "qgis.h"
20#include "qgis_core.h"
21#include "qgsbox3d.h"
22#include "qgsgeometry.h"
23#include "qgsmimedatautils.h"
24#include "qgsrange.h"
25#include "qgsstacasset.h"
26#include "qgsstacobject.h"
27
34class CORE_EXPORT QgsStacItem : public QgsStacObject
35{
36 public:
38 QgsStacItem() = delete;
39
51 const QString &id, const QString &version, const QgsGeometry &geometry, const QVariantMap &properties, const QVector< QgsStacLink > &links, const QMap< QString, QgsStacAsset > &assets, const QgsBox3D &bbox
52 );
53
54 Qgis::StacObjectType type() const override;
55 QString toHtml() const override;
56
58 QgsGeometry geometry() const;
59
61 void setGeometry( const QgsGeometry &geometry );
62
64 QgsBox3D boundingBox() const;
65
67 void setBoundingBox( const QgsBox3D &bbox );
68
70 QVariantMap properties() const;
71
73 void setProperties( const QVariantMap &properties );
74
76 QMap< QString, QgsStacAsset > assets() const;
77
79 void setAssets( const QMap< QString, QgsStacAsset > &assets );
80
82 QString collection() const;
83
85 void setCollection( const QString &collection );
86
96 QDateTime dateTime() const;
97
104 bool hasDateTimeRange() const;
105
113
118 QString title() const;
119
125 QString description() const;
126
132
133 private:
134 QgsGeometry mGeometry;
135 QgsBox3D mBbox;
136 QVariantMap mProperties;
137 QMap< QString, QgsStacAsset > mAssets;
138 QString mCollection;
139};
140
141#endif // QGSSTACITEM_H
StacObjectType
Available types of stac objects.
Definition qgis.h:6885
A 3-dimensional box composed of x, y, z coordinates.
Definition qgsbox3d.h:45
A geometry is the spatial representation of a feature.
QList< QgsMimeDataUtils::Uri > UriList
QMap< QString, QgsStacAsset > assets() const
Returns a dictionary of asset objects, each with a unique key.
QString title() const
Returns an optional human readable title describing the Item.
QgsBox3D boundingBox() const
Returns the STAC item's spatial extent in WGS84 coordinates.
QgsMimeDataUtils::UriList uris() const
Returns a list of uris of all assets that have a cloud optimized format like COG or COPC.
QString description() const
Returns a Detailed multi-line description to fully explain the Item.
bool hasDateTimeRange() const
Returns true if a temporal interval is available for this item, false if a single QDateTime is availa...
QgsDateTimeRange dateTimeRange() const
Returns the temporal interval stored in the item's properties().
void setAssets(const QMap< QString, QgsStacAsset > &assets)
Sets the asset objects, each with a unique key.
void setProperties(const QVariantMap &properties)
Sets the item's additional metadata to properties.
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().
QVariantMap properties() const
Returns a dictionary of additional metadata for the Item.
QgsGeometry geometry() const
Returns the full footprint of the asset represented by this item, in WGS84.
QgsStacItem()=delete
Default constructor deleted, use the variant with required parameters.
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.
virtual QString toHtml() const =0
Returns an HTML representation of the STAC object.
QgsStacObject()=delete
Default constructor is used for creating invalid objects.
virtual Qgis::StacObjectType type() const =0
Returns the Type of the STAC object.
QVector< QgsStacLink > links() const
Returns the STAC links included in the object.
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.
Definition qgsrange.h:705