mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-30 00:07:09 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			176 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			176 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/server/qgsserverapiutils.h                                       *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsServerApiUtils
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| 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 (possibly empty)
 | |
| :py:class:`QgsRectangle`.
 | |
| 
 | |
| .. note::
 | |
| 
 | |
|    Z values (i.e. a 6 elements bbox) are silently discarded
 | |
| %End
 | |
| 
 | |
|     static QList<QgsServerWmsDimensionProperties::WmsDimensionInfo> temporalDimensions( const QgsVectorLayer *layer );
 | |
| %Docstring
 | |
| Returns a list of temporal dimensions information for the given
 | |
| ``layer`` (either configured in wmsDimensions or the first date/datetime
 | |
| field)
 | |
| 
 | |
| .. versionadded:: 3.12
 | |
| %End
 | |
| 
 | |
|     static QgsDateRange parseTemporalDateInterval( const QString &interval );
 | |
| %Docstring
 | |
| Parses a date ``interval`` and returns a :py:class:`QgsDateRange`
 | |
| 
 | |
| :raises QgsServerApiBadRequestException: if interval cannot be parsed
 | |
| 
 | |
| .. versionadded:: 3.12
 | |
| %End
 | |
| 
 | |
|     static QgsDateTimeRange parseTemporalDateTimeInterval( const QString &interval );
 | |
| %Docstring
 | |
| Parses a datetime ``interval`` and returns a
 | |
| :py:class:`QgsDateTimeRange`
 | |
| 
 | |
| :raises QgsServerApiBadRequestException: if interval cannot be parsed
 | |
| 
 | |
| .. versionadded:: 3.12
 | |
| %End
 | |
| 
 | |
| 
 | |
|     static QString fieldName( const QString &name, const QgsVectorLayer *layer );
 | |
| %Docstring
 | |
| Given a field ``name`` (or display name) and a ``layer`` returns the
 | |
| actual name of the field.
 | |
| 
 | |
| :raises QgsServerApiBadRequestException: if ``name`` is neither a field
 | |
|                                          name or a display name.
 | |
| 
 | |
| .. versionadded:: 3.28
 | |
| %End
 | |
| 
 | |
| 
 | |
| 
 | |
|     static QgsExpression temporalFilterExpression( const QgsVectorLayer *layer, const QString &interval );
 | |
| %Docstring
 | |
| Parses the ``interval`` and constructs a (possibly invalid) temporal
 | |
| filter expression for the given ``layer``
 | |
| 
 | |
| Interval 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
 | |
| 
 | |
| .. versionadded:: 3.12
 | |
| %End
 | |
| 
 | |
| 
 | |
| 
 | |
|     static QVariantList temporalExtentList( const QgsVectorLayer *layer ) /PyName=temporalExtent/;
 | |
| %Docstring
 | |
| temporalExtent returns a json array with an array of [min, max] temporal
 | |
| extent for the given ``layer``. In case multiple temporal dimensions are
 | |
| available in the layer, a union of all dimensions is returned.
 | |
| 
 | |
| From specifications:
 | |
| http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/extent.yaml
 | |
| 
 | |
| One or more time intervals that describe the temporal extent of the
 | |
| dataset. The value `null` is supported and indicates an open time
 | |
| interval.
 | |
| 
 | |
| In the Core only a single time interval is supported. Extensions may
 | |
| support multiple intervals. If multiple intervals are provided, the
 | |
| union of the intervals describes the temporal extent.
 | |
| 
 | |
| :return: An array of intervals
 | |
| 
 | |
| .. versionadded:: 3.12
 | |
| %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 QVector<QgsVectorLayer *> publishedWfsLayers( const QgsServerApiContext &context );
 | |
| %Docstring
 | |
| Returns the list of layers accessible to the service for a given
 | |
| ``context``.
 | |
| 
 | |
| This method takes into account the ACL restrictions provided by QGIS
 | |
| Server Access Control plugins.
 | |
| %End
 | |
| 
 | |
| 
 | |
| 
 | |
|     static QString sanitizedFieldValue( const QString &value );
 | |
| %Docstring
 | |
| Sanitizes the input ``value`` by removing URL encoding.
 | |
| 
 | |
| .. note::
 | |
| 
 | |
|    the returned value is meant to become part of a :py:class:`QgsExpression` filter
 | |
| %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 ) /Deprecated="Since 3.30. Use QgsCoordinateReferenceSystem.toOgcUri() instead."/;
 | |
| %Docstring
 | |
| Returns a ``crs`` as OGC URI (format:
 | |
| http://www.opengis.net/def/crs/OGC/1.3/CRS84) Returns an empty string on
 | |
| failure.
 | |
| 
 | |
| .. deprecated:: 3.30
 | |
| 
 | |
|    Use :py:func:`QgsCoordinateReferenceSystem.toOgcUri()` instead.
 | |
| %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.py again   *
 | |
|  ************************************************************************/
 |