2019-08-06 16:38:21 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/server/qgsserverapiutils.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-28 08:14:12 +02:00
|
|
|
|
2019-08-06 16:38:21 +02:00
|
|
|
class QgsServerApiUtils
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
The QgsServerApiUtils class contains helper functions to handle common API operations.
|
|
|
|
|
|
|
|
.. versionadded:: 3.10
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsserverapiutils.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
static QgsRectangle parseBbox( const QString &bbox );
|
|
|
|
%Docstring
|
2019-10-25 21:51:21 +02:00
|
|
|
Parses a comma separated ``bbox`` into a (possibly empty) :py:class:`QgsRectangle`.
|
2019-08-06 16:38:21 +02:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Z values (i.e. a 6 elements bbox) are silently discarded
|
|
|
|
%End
|
|
|
|
|
2019-10-18 08:01:19 +02:00
|
|
|
struct TemporalDateInterval
|
|
|
|
{
|
|
|
|
QDate begin;
|
|
|
|
QDate end;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TemporalDateTimeInterval
|
|
|
|
{
|
|
|
|
QDateTime begin;
|
|
|
|
QDateTime end;
|
|
|
|
};
|
|
|
|
|
|
|
|
static TemporalDateInterval parseTemporalDateInterval( const QString &interval ) throw( QgsServerApiBadRequestException );
|
|
|
|
%Docstring
|
|
|
|
Parse a date time ``interval`` and returns a TemporalInterval
|
|
|
|
|
|
|
|
:raises QgsServerApiBadRequestException: if interval cannot be parsed
|
|
|
|
%End
|
|
|
|
static TemporalDateTimeInterval parseTemporalDateTimeInterval( const QString &interval ) throw( QgsServerApiBadRequestException );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static QgsExpression temporalFilterExpression( const QgsVectorLayer *layer, const QString &interval );
|
|
|
|
%Docstring
|
|
|
|
Parse the ``interval`` and constructs a (possibily invalid) temporal filter expression for the given ``layer``
|
|
|
|
|
|
|
|
Syntax:
|
|
|
|
|
|
|
|
interval-closed = date-time "/" date-time
|
|
|
|
interval-open-start = [".."] "/" date-time
|
|
|
|
interval-open-end = date-time "/" [".."]
|
|
|
|
interval = interval-closed / interval-open-start / interval-open-end
|
|
|
|
datetime = date-time / interval
|
|
|
|
%End
|
|
|
|
|
2019-08-06 16:38:21 +02:00
|
|
|
|
|
|
|
static QgsCoordinateReferenceSystem parseCrs( const QString &bboxCrs );
|
|
|
|
%Docstring
|
|
|
|
Parses the CRS URI ``bboxCrs`` (example: "http://www.opengis.net/def/crs/OGC/1.3/CRS84") into a QGIS CRS object
|
|
|
|
%End
|
|
|
|
|
|
|
|
static const QVector<QgsMapLayer *> publishedWfsLayers( const QgsProject *project );
|
|
|
|
%Docstring
|
|
|
|
Returns the list of layers accessible to the service for a given ``project``.
|
|
|
|
|
|
|
|
This method takes into account the ACL restrictions provided by QGIS Server Access Control plugins.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
project must not be NULL
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
static QString sanitizedFieldValue( const QString &value );
|
|
|
|
%Docstring
|
|
|
|
Sanitizes the input ``value`` by removing URL encoding and checking for malicious content.
|
|
|
|
In case of failure returns an empty string.
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QStringList publishedCrsList( const QgsProject *project );
|
|
|
|
%Docstring
|
|
|
|
Returns the list of CRSs (format: http://www.opengis.net/def/crs/OGC/1.3/CRS84) available for this ``project``.
|
|
|
|
Information is read from project WMS configuration.
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QString crsToOgcUri( const QgsCoordinateReferenceSystem &crs );
|
|
|
|
%Docstring
|
|
|
|
Returns a ``crs`` as OGC URI (format: http://www.opengis.net/def/crs/OGC/1.3/CRS84)
|
|
|
|
Returns an empty string on failure.
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QString appendMapParameter( const QString &path, const QUrl &requestUrl );
|
|
|
|
%Docstring
|
|
|
|
Appends MAP query string parameter from current ``requestUrl`` to the given ``path``
|
|
|
|
%End
|
|
|
|
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/server/qgsserverapiutils.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|