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

SpatioTemporal Asset Catalog JSON parser. More...

#include <qgsstacparser.h>

Public Member Functions

 QgsStacParser ()=default
 Default constructor.
std::unique_ptr< QgsStacCatalogcatalog ()
 Returns the parsed STAC Catalog If parsing failed, nullptr is returned The caller takes ownership of the returned catalog.
std::unique_ptr< QgsStacCollectioncollection ()
 Returns the parsed STAC Collection If parsing failed, nullptr is returned The caller takes ownership of the returned collection.
QgsStacCollectionListcollections ()
 Returns the parsed STAC API Collections If parsing failed, nullptr is returned The caller takes ownership of the returned collections.
QString error () const
 Returns the last parsing error.
std::unique_ptr< QgsStacItemitem ()
 Returns the parsed STAC Item If parsing failed, nullptr is returned The caller takes ownership of the returned item.
std::unique_ptr< QgsStacItemCollectionitemCollection ()
 Returns the parsed STAC API Item Collection If parsing failed, nullptr is returned The caller takes ownership of the returned item collection.
void setBaseUrl (const QUrl &url)
 Sets the base url that will be used to resolve relative links.
void setData (const QByteArray &data)
 Sets the JSON data to be parsed.
Qgis::StacObjectType type () const
 Returns the type of the parsed object.

Detailed Description

SpatioTemporal Asset Catalog JSON parser.

This class parses json data and creates the appropriate STAC Catalog, Collection, Item or ItemCollection.

Since
QGIS 3.44

Definition at line 43 of file qgsstacparser.h.

Constructor & Destructor Documentation

◆ QgsStacParser()

QgsStacParser::QgsStacParser ( )
default

Default constructor.

Member Function Documentation

◆ catalog()

std::unique_ptr< QgsStacCatalog > QgsStacParser::catalog ( )

Returns the parsed STAC Catalog If parsing failed, nullptr is returned The caller takes ownership of the returned catalog.

Definition at line 90 of file qgsstacparser.cpp.

◆ collection()

std::unique_ptr< QgsStacCollection > QgsStacParser::collection ( )

Returns the parsed STAC Collection If parsing failed, nullptr is returned The caller takes ownership of the returned collection.

Definition at line 146 of file qgsstacparser.cpp.

◆ collections()

QgsStacCollectionList * QgsStacParser::collections ( )

Returns the parsed STAC API Collections If parsing failed, nullptr is returned The caller takes ownership of the returned collections.

Definition at line 492 of file qgsstacparser.cpp.

◆ error()

QString QgsStacParser::error ( ) const

Returns the last parsing error.

Definition at line 85 of file qgsstacparser.cpp.

◆ item()

std::unique_ptr< QgsStacItem > QgsStacParser::item ( )

Returns the parsed STAC Item If parsing failed, nullptr is returned The caller takes ownership of the returned item.

Definition at line 289 of file qgsstacparser.cpp.

◆ itemCollection()

std::unique_ptr< QgsStacItemCollection > QgsStacParser::itemCollection ( )

Returns the parsed STAC API Item Collection If parsing failed, nullptr is returned The caller takes ownership of the returned item collection.

Definition at line 456 of file qgsstacparser.cpp.

◆ setBaseUrl()

void QgsStacParser::setBaseUrl ( const QUrl & url)

Sets the base url that will be used to resolve relative links.

If not called, relative links will not be resolved to absolute links.

Definition at line 75 of file qgsstacparser.cpp.

◆ setData()

void QgsStacParser::setData ( const QByteArray & data)

Sets the JSON data to be parsed.

Definition at line 30 of file qgsstacparser.cpp.

◆ type()

Qgis::StacObjectType QgsStacParser::type ( ) const

Returns the type of the parsed object.

Definition at line 80 of file qgsstacparser.cpp.


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