QGIS/python/server/auto_generated/qgsserverprojectutils.sip.in
Nyall Dawson 3f6b490218 Sipify
2025-04-02 11:11:10 +10:00

577 lines
16 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsserverprojectutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsServerProjectUtils
{
%Docstring(signature="appended")
Contains utility functions to retrieve specific entries from a
:py:class:`QgsProject`.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsserverprojectutils.h"
%End
public:
static bool owsServiceCapabilities( const QgsProject &project );
%Docstring
Returns if owsService capabilities are enabled.
:param project: the QGIS project
:return: if owsService capabilities are enabled.
%End
static QString owsServiceTitle( const QgsProject &project );
%Docstring
Returns the owsService title defined in project.
:param project: the QGIS project
:return: the owsService title if defined in project with project title
as fallback, "Untitled" otherwise.
%End
static QString owsServiceAbstract( const QgsProject &project );
%Docstring
Returns the owsService abstract defined in project.
:param project: the QGIS project
:return: the owsService abstract if defined in project.
%End
static QStringList owsServiceKeywords( const QgsProject &project );
%Docstring
Returns the owsService keywords defined in project.
:param project: the QGIS project
:return: the owsService keywords if defined in project.
%End
static QString owsServiceOnlineResource( const QgsProject &project );
%Docstring
Returns the owsService online resource defined in project.
:param project: the QGIS project
:return: the owsService online resource if defined in project.
%End
static QString owsServiceContactOrganization( const QgsProject &project );
%Docstring
Returns the owsService contact organization defined in project.
:param project: the QGIS project
:return: the owsService contact organization if defined in project.
%End
static QString owsServiceContactPosition( const QgsProject &project );
%Docstring
Returns the owsService contact position defined in project.
:param project: the QGIS project
:return: the owsService contact position if defined in project.
%End
static QString owsServiceContactPerson( const QgsProject &project );
%Docstring
Returns the owsService contact person defined in project.
:param project: the QGIS project
:return: the owsService contact person if defined in project.
%End
static QString owsServiceContactMail( const QgsProject &project );
%Docstring
Returns the owsService contact mail defined in project.
:param project: the QGIS project
:return: the owsService contact mail if defined in project.
%End
static QString owsServiceContactPhone( const QgsProject &project );
%Docstring
Returns the owsService contact phone defined in project.
:param project: the QGIS project
:return: the owsService contact phone if defined in project.
%End
static QString owsServiceFees( const QgsProject &project );
%Docstring
Returns the owsService fees defined in project.
:param project: the QGIS project
:return: the owsService fees if defined in project.
%End
static QString owsServiceAccessConstraints( const QgsProject &project );
%Docstring
Returns the owsService access constraints defined in project.
:param project: the QGIS project
:return: the owsService access constraints if defined in project.
%End
static int wmsMaxWidth( const QgsProject &project );
%Docstring
Returns the maximum width for WMS images defined in a QGIS project.
:param project: the QGIS project
:return: width if defined in project, -1 otherwise.
%End
static int wmsMaxHeight( const QgsProject &project );
%Docstring
Returns the maximum height for WMS images defined in a QGIS project.
:param project: the QGIS project
:return: height if defined in project, -1 otherwise.
%End
static int wmsImageQuality( const QgsProject &project );
%Docstring
Returns the quality for WMS images defined in a QGIS project.
:param project: the QGIS project
:return: quality if defined in project, -1 otherwise.
%End
static int wmsTileBuffer( const QgsProject &project );
%Docstring
Returns the tile buffer in pixels for WMS images defined in a QGIS
project.
:param project: the QGIS project
:return: tile buffer if defined in project, 0 otherwise.
.. versionadded:: 3.10
%End
static bool wmsRenderMapTiles( const QgsProject &project );
%Docstring
Returns ``True`` if WMS requests should use the
:py:class:`QgsMapSettings`.RenderMapTile flag, so that no visible
artifacts are visible between adjacent tiles.
This flag can slow down rendering considerably, so it is only used if
the corresponding setting is enabled in the project.
:param project: the QGIS project
:return: ``True`` if the flag should be used, or ``False`` if not.
.. versionadded:: 3.18
%End
static int wmsMaxAtlasFeatures( const QgsProject &project );
%Docstring
Returns the maximum number of atlas features which can be printed in a
request
:param project: the QGIS project
:return: the number of atlas features
%End
static double wmsDefaultMapUnitsPerMm( const QgsProject &project );
%Docstring
Returns the default number of map units per millimeters in case of the
scale is not given
:param project: the QGIS project
:return: the default number of map units per millimeter
.. versionadded:: 3.4
%End
static bool wmsUseLayerIds( const QgsProject &project );
%Docstring
Returns if layer ids are used as name in WMS.
:param project: the QGIS project
:return: if layer ids are used as name.
%End
static bool wmsInfoFormatSia2045( const QgsProject &project );
%Docstring
Returns if the info format is SIA20145.
:param project: the QGIS project
:return: if the info format is SIA20145.
%End
static bool wmsFeatureInfoAddWktGeometry( const QgsProject &project );
%Docstring
Returns if the geometry is displayed as Well Known Text in
GetFeatureInfo request.
:param project: the QGIS project
:return: if the geometry is displayed as Well Known Text in
GetFeatureInfo request.
%End
static bool wmsFeatureInfoUseAttributeFormSettings( const QgsProject &project );
%Docstring
Returns if feature form settings should be considered for the format of
the feature info response
:param project: the QGIS project
:return: true if the feature form settings shall be considered for the
feature info response
%End
static bool wmsFeatureInfoSegmentizeWktGeometry( const QgsProject &project );
%Docstring
Returns if the geometry has to be segmentize in GetFeatureInfo request.
:param project: the QGIS project
:return: if the geometry has to be segmentize in GetFeatureInfo request.
%End
static bool wmsAddLegendGroupsLegendGraphic( const QgsProject &project );
%Docstring
Returns if legend groups should be in the legend graphic response if
GetLegendGraphic is called on a layer group.
:param project: the QGIS project
:return: if the GetLegendGraphic response has to contain legend groups
%End
static bool wmsSkipNameForGroup( const QgsProject &project );
%Docstring
Returns if name attribute should be skipped for groups in WMS
capabilities document.
:param project: the QGIS project
:return: if name attribute should be skipped for groups in capabilities
.. versionadded:: 3.36
%End
static int wmsFeatureInfoPrecision( const QgsProject &project );
%Docstring
Returns the geometry precision for GetFeatureInfo request.
:param project: the QGIS project
:return: the geometry precision for GetFeatureInfo request.
%End
static QString wmsFeatureInfoDocumentElement( const QgsProject &project );
%Docstring
Returns the document element name for XML GetFeatureInfo request.
:param project: the QGIS project
:return: the document element name for XML GetFeatureInfo request.
%End
static QString wmsFeatureInfoDocumentElementNs( const QgsProject &project );
%Docstring
Returns the document element namespace for XML GetFeatureInfo request.
:param project: the QGIS project
:return: the document element namespace for XML GetFeatureInfo request.
%End
static QString wmsFeatureInfoSchema( const QgsProject &project );
%Docstring
Returns the schema URL for XML GetFeatureInfo request.
:param project: the QGIS project
:return: the schema URL for XML GetFeatureInfo request.
%End
static QHash<QString, QString> wmsFeatureInfoLayerAliasMap( const QgsProject &project );
%Docstring
Returns the mapping between layer name and wms layer name for
GetFeatureInfo request.
:param project: the QGIS project
:return: the mapping between layer name and wms layer name for
GetFeatureInfo request.
%End
static bool wmsInspireActivate( const QgsProject &project );
%Docstring
Returns if Inspire is activated.
:param project: the QGIS project
:return: if Inspire is activated.
%End
static QString wmsInspireLanguage( const QgsProject &project );
%Docstring
Returns the Inspire language.
:param project: the QGIS project
:return: the Inspire language if defined in project.
%End
static QString wmsInspireMetadataUrl( const QgsProject &project );
%Docstring
Returns the Inspire metadata URL.
:param project: the QGIS project
:return: the Inspire metadata URL if defined in project.
%End
static QString wmsInspireMetadataUrlType( const QgsProject &project );
%Docstring
Returns the Inspire metadata URL type.
:param project: the QGIS project
:return: the Inspire metadata URL type if defined in project.
%End
static QString wmsInspireTemporalReference( const QgsProject &project );
%Docstring
Returns the Inspire temporal reference.
:param project: the QGIS project
:return: the Inspire temporal reference if defined in project.
%End
static QString wmsInspireMetadataDate( const QgsProject &project );
%Docstring
Returns the Inspire metadata date.
:param project: the QGIS project
:return: the Inspire metadata date if defined in project.
%End
static QStringList wmsRestrictedComposers( const QgsProject &project );
%Docstring
Returns the restricted composer list.
:param project: the QGIS project
:return: the restricted composer list if defined in project.
%End
static QString wmsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
%Docstring
Returns the WMS service url. The URL defined in the project or if not
defined the URL from serviceUrl.
:param project: the QGIS project
:param request: the request
:param settings: the server settings
:return: url to use for this service
%End
static QString wmsRootName( const QgsProject &project );
%Docstring
Returns the WMS root layer name defined in a QGIS project.
:param project: the QGIS project
:return: root layer name to use for this service
%End
static QStringList wmsRestrictedLayers( const QgsProject &project );
%Docstring
Returns the restricted layer name list.
:param project: the QGIS project
:return: the restricted layer name list if defined in project.
%End
static QStringList wmsOutputCrsList( const QgsProject &project );
%Docstring
Returns the WMS output CRS list.
:param project: the QGIS project
:return: the WMS output CRS list.
%End
static QgsRectangle wmsExtent( const QgsProject &project );
%Docstring
Returns the WMS Extent restriction.
:param project: the QGIS project
:return: the WMS Extent restriction.
%End
static QString wfsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
%Docstring
Returns the WFS service url. The URL defined in the project or if not
defined the URL from serviceUrl.
:param project: the QGIS project
:param request: the request
:param settings: the server settings
:return: url to use for this service
%End
static QStringList wfsLayerIds( const QgsProject &project );
%Docstring
Returns the Layer ids list defined in a QGIS project as published in
WFS.
:param project: the QGIS project
:return: the Layer ids list.
%End
static int wfsLayerPrecision( const QgsProject &project, const QString &layerId );
%Docstring
Returns the Layer precision defined in a QGIS project for the WFS
GetFeature.
:param project: the QGIS project
:param layerId: the layer id in the project
:return: the layer precision for WFS GetFeature.
%End
static QStringList wfstUpdateLayerIds( const QgsProject &project );
%Docstring
Returns the Layer ids list defined in a QGIS project as published as
WFS-T with update capabilities.
:param project: the QGIS project
:return: the Layer ids list.
%End
static QStringList wfstInsertLayerIds( const QgsProject &project );
%Docstring
Returns the Layer ids list defined in a QGIS project as published as
WFS-T with insert capabilities.
:param project: the QGIS project
:return: the Layer ids list.
%End
static QStringList wfstDeleteLayerIds( const QgsProject &project );
%Docstring
Returns the Layer ids list defined in a QGIS project as published as
WFS-T with delete capabilities.
:param project: the QGIS project
:return: the Layer ids list.
%End
static QString wcsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
%Docstring
Returns the WCS service url. The URL defined in the project or if not
defined the URL from serviceUrl.
:param project: the QGIS project
:param request: the request
:param settings: the server settings
:return: url to use for this service
%End
static QStringList wcsLayerIds( const QgsProject &project );
%Docstring
Returns the Layer ids list defined in a QGIS project as published in
WCS.
:param project: the QGIS project
:return: the Layer ids list.
%End
static QString wmtsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
%Docstring
Returns the WMTS service url. The URL defined in the project or if not
defined the URL from serviceUrl.
:param project: the QGIS project
:param request: the request
:param settings: the server settings
:return: url to use for this service
.. versionadded:: 3.4
%End
static QString serviceUrl( const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings );
%Docstring
Returns the service url defined in the environment variable or with HTTP
header. This is calculated from (in order of precedence):
- Value defined in the project per service
- The ``QGIS_SERVER_<service>_SERVICE_URL`` environment variable
- The ``QGIS_SERVER_SERVICE_URL`` environment variable
- The custom ``X-:py:class:`Qgis`-<service>-Service-Url`` header
- The custom ``X-:py:class:`Qgis`-Service-Url`` header
- Build from the standard ``Forwarded`` header
- Build from the pseudo standard ``X-Forwarded-Host`` and
``X-Forwarded-Proto`` headers
- Build from the standard ``Host`` header and the server protocol
- Build from the server name and the server protocol.
:param request: the request
:param service: the used service
:param settings: the server settings
:return: url to use for this service
.. versionadded:: 3.20
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsserverprojectutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/