QGIS API Documentation 4.3.0-Master (389d690bb77)
Loading...
Searching...
No Matches
qgsstacasset.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsstacasset.h
3 ---------------------
4 begin : October 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 QGSSTACASSET_H
17#define QGSSTACASSET_H
18
19#include "qgis.h"
20#include "qgis_core.h"
21#include "qgsmimedatautils.h"
22
23#include <QString>
24#include <QStringList>
25
32class CORE_EXPORT QgsStacAsset
33{
34 public:
36 QgsStacAsset( const QString &href, const QString &title, const QString &description, const QString &mediaType, const QStringList &roles );
37
39 QString href() const;
40
42 QString title() const;
43
48 QString description() const;
49
51 QString mediaType() const;
52
57 QStringList roles() const;
58
63 bool isCloudOptimized() const;
64
69 QString formatName() const;
70
80 QgsMimeDataUtils::Uri uri( const QString &authcfg = QString() ) const;
81
86 QString toHtml( const QString &assetId ) const;
87
92 bool isDownloadable() const;
93
94 private:
95 QString mHref;
96 QString mTitle;
97 QString mDescription;
98 QString mMediaType;
99 QStringList mRoles;
100};
101
102#endif // QGSSTACASSET_H
bool isCloudOptimized() const
Returns whether the asset is in a cloud optimized format like COG or COPC.
QString formatName() const
Returns the format name for cloud optimized formats.
QStringList roles() const
Returns the roles assigned to the asset.
QString toHtml(const QString &assetId) const
Returns an HTML representation of the STAC Asset including its ID within its container.
bool isDownloadable() const
Returns whether the asset can be downloaded.
QString mediaType() const
Returns the media type of the asset.
QString href() const
Returns the URI to the asset object.
QgsMimeDataUtils::Uri uri(const QString &authcfg=QString()) const
Returns a uri for the asset if it is a cloud optimized file like COG or COPC.
QgsStacAsset(const QString &href, const QString &title, const QString &description, const QString &mediaType, const QStringList &roles)
Constructor.
QString title() const
Returns the displayed title for clients and users.
QString description() const
Returns a description of the Asset providing additional details, such as how it was processed or crea...