mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
95 lines
3.1 KiB
Plaintext
95 lines
3.1 KiB
Plaintext
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/server/qgsserverapiutils.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
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
|
||
|
Parses a comma separated ``bbox`` into a (possibily empty) :py:class:`QgsRectangle`.
|
||
|
|
||
|
.. note::
|
||
|
|
||
|
Z values (i.e. a 6 elements bbox) are silently discarded
|
||
|
%End
|
||
|
|
||
|
|
||
|
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 QgsFields publishedFields( const QgsVectorLayer *layer );
|
||
|
%Docstring
|
||
|
Returns the list of fields accessible to the service for a given ``layer``.
|
||
|
|
||
|
This method takes into account the ACL restrictions provided by QGIS Server Access Control plugins.
|
||
|
TODO: implement ACL
|
||
|
%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
|
||
|
TODO: implement ACL
|
||
|
%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 *
|
||
|
************************************************************************/
|