QGIS API Documentation 3.41.0-Master (d5b93354e9c)
|
The QgsServerProjectUtils namespace provides a way to retrieve specific entries from a QgsProject. More...
Functions | |
SERVER_EXPORT double | ceilWithPrecision (double number, int places) |
Returns a double greater than number to the specified number of places. | |
SERVER_EXPORT double | floorWithPrecision (double number, int places) |
Returns a double less than number to the specified number of places. | |
SERVER_EXPORT QString | owsServiceAbstract (const QgsProject &project) |
Returns the owsService abstract defined in project. | |
SERVER_EXPORT QString | owsServiceAccessConstraints (const QgsProject &project) |
Returns the owsService access constraints defined in project. | |
SERVER_EXPORT bool | owsServiceCapabilities (const QgsProject &project) |
Returns if owsService capabilities are enabled. | |
SERVER_EXPORT QString | owsServiceContactMail (const QgsProject &project) |
Returns the owsService contact mail defined in project. | |
SERVER_EXPORT QString | owsServiceContactOrganization (const QgsProject &project) |
Returns the owsService contact organization defined in project. | |
SERVER_EXPORT QString | owsServiceContactPerson (const QgsProject &project) |
Returns the owsService contact person defined in project. | |
SERVER_EXPORT QString | owsServiceContactPhone (const QgsProject &project) |
Returns the owsService contact phone defined in project. | |
SERVER_EXPORT QString | owsServiceContactPosition (const QgsProject &project) |
Returns the owsService contact position defined in project. | |
SERVER_EXPORT QString | owsServiceFees (const QgsProject &project) |
Returns the owsService fees defined in project. | |
SERVER_EXPORT QStringList | owsServiceKeywords (const QgsProject &project) |
Returns the owsService keywords defined in project. | |
SERVER_EXPORT QString | owsServiceOnlineResource (const QgsProject &project) |
Returns the owsService online resource defined in project. | |
SERVER_EXPORT QString | owsServiceTitle (const QgsProject &project) |
Returns the owsService title defined in project. | |
SERVER_EXPORT QString | serviceUrl (const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings) |
Returns the service url defined in the environment variable or with HTTP header. | |
SERVER_EXPORT QStringList | wcsLayerIds (const QgsProject &project) |
Returns the Layer ids list defined in a QGIS project as published in WCS. | |
SERVER_EXPORT QString | wcsServiceUrl (const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings()) |
Returns the WCS service url. | |
SERVER_EXPORT QStringList | wfsLayerIds (const QgsProject &project) |
Returns the Layer ids list defined in a QGIS project as published in WFS. | |
SERVER_EXPORT int | wfsLayerPrecision (const QgsProject &project, const QString &layerId) |
Returns the Layer precision defined in a QGIS project for the WFS GetFeature. | |
SERVER_EXPORT QString | wfsServiceUrl (const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings()) |
Returns the WFS service url. | |
SERVER_EXPORT QStringList | wfstDeleteLayerIds (const QgsProject &project) |
Returns the Layer ids list defined in a QGIS project as published as WFS-T with delete capabilities. | |
SERVER_EXPORT QStringList | wfstInsertLayerIds (const QgsProject &project) |
Returns the Layer ids list defined in a QGIS project as published as WFS-T with insert capabilities. | |
SERVER_EXPORT QStringList | wfstUpdateLayerIds (const QgsProject &project) |
Returns the Layer ids list defined in a QGIS project as published as WFS-T with update capabilities. | |
SERVER_EXPORT bool | wmsAddLegendGroupsLegendGraphic (const QgsProject &project) |
Returns if legend groups should be in the legend graphic response if GetLegendGraphic is called on a layer group. | |
SERVER_EXPORT double | wmsDefaultMapUnitsPerMm (const QgsProject &project) |
Returns the default number of map units per millimeters in case of the scale is not given. | |
SERVER_EXPORT QgsRectangle | wmsExtent (const QgsProject &project) |
Returns the WMS Extent restriction. | |
SERVER_EXPORT bool | wmsFeatureInfoAddWktGeometry (const QgsProject &project) |
Returns if the geometry is displayed as Well Known Text in GetFeatureInfo request. | |
SERVER_EXPORT QString | wmsFeatureInfoDocumentElement (const QgsProject &project) |
Returns the document element name for XML GetFeatureInfo request. | |
SERVER_EXPORT QString | wmsFeatureInfoDocumentElementNs (const QgsProject &project) |
Returns the document element namespace for XML GetFeatureInfo request. | |
SERVER_EXPORT QHash< QString, QString > | wmsFeatureInfoLayerAliasMap (const QgsProject &project) |
Returns the mapping between layer name and wms layer name for GetFeatureInfo request. | |
SERVER_EXPORT int | wmsFeatureInfoPrecision (const QgsProject &project) |
Returns the geometry precision for GetFeatureInfo request. | |
SERVER_EXPORT QString | wmsFeatureInfoSchema (const QgsProject &project) |
Returns the schema URL for XML GetFeatureInfo request. | |
SERVER_EXPORT bool | wmsFeatureInfoSegmentizeWktGeometry (const QgsProject &project) |
Returns if the geometry has to be segmentize in GetFeatureInfo request. | |
SERVER_EXPORT bool | wmsFeatureInfoUseAttributeFormSettings (const QgsProject &project) |
Returns if feature form settings should be considered for the format of the feature info response. | |
SERVER_EXPORT int | wmsImageQuality (const QgsProject &project) |
Returns the quality for WMS images defined in a QGIS project. | |
SERVER_EXPORT bool | wmsInfoFormatSia2045 (const QgsProject &project) |
Returns if the info format is SIA20145. | |
SERVER_EXPORT bool | wmsInspireActivate (const QgsProject &project) |
Returns if Inspire is activated. | |
SERVER_EXPORT QString | wmsInspireLanguage (const QgsProject &project) |
Returns the Inspire language. | |
SERVER_EXPORT QString | wmsInspireMetadataDate (const QgsProject &project) |
Returns the Inspire metadata date. | |
SERVER_EXPORT QString | wmsInspireMetadataUrl (const QgsProject &project) |
Returns the Inspire metadata URL. | |
SERVER_EXPORT QString | wmsInspireMetadataUrlType (const QgsProject &project) |
Returns the Inspire metadata URL type. | |
SERVER_EXPORT QString | wmsInspireTemporalReference (const QgsProject &project) |
Returns the Inspire temporal reference. | |
SERVER_EXPORT int | wmsMaxAtlasFeatures (const QgsProject &project) |
Returns the maximum number of atlas features which can be printed in a request. | |
SERVER_EXPORT int | wmsMaxHeight (const QgsProject &project) |
Returns the maximum height for WMS images defined in a QGIS project. | |
SERVER_EXPORT int | wmsMaxWidth (const QgsProject &project) |
Returns the maximum width for WMS images defined in a QGIS project. | |
SERVER_EXPORT QStringList | wmsOutputCrsList (const QgsProject &project) |
Returns the WMS output CRS list. | |
SERVER_EXPORT bool | wmsRenderMapTiles (const QgsProject &project) |
Returns true if WMS requests should use the QgsMapSettings::RenderMapTile flag, so that no visible artifacts are visible between adjacent tiles. | |
SERVER_EXPORT QStringList | wmsRestrictedComposers (const QgsProject &project) |
Returns the restricted composer list. | |
SERVER_EXPORT QStringList | wmsRestrictedLayers (const QgsProject &project) |
Returns the restricted layer name list. | |
SERVER_EXPORT QString | wmsRootName (const QgsProject &project) |
Returns the WMS root layer name defined in a QGIS project. | |
SERVER_EXPORT QString | wmsServiceUrl (const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings()) |
Returns the WMS service url. | |
SERVER_EXPORT bool | wmsSkipNameForGroup (const QgsProject &project) |
Returns if name attribute should be skipped for groups in WMS capabilities document. | |
SERVER_EXPORT int | wmsTileBuffer (const QgsProject &project) |
Returns the tile buffer in pixels for WMS images defined in a QGIS project. | |
SERVER_EXPORT bool | wmsUseLayerIds (const QgsProject &project) |
Returns if layer ids are used as name in WMS. | |
SERVER_EXPORT QString | wmtsServiceUrl (const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings()) |
Returns the WMTS service url. | |
The QgsServerProjectUtils namespace provides a way to retrieve specific entries from a QgsProject.
double QgsServerProjectUtils::ceilWithPrecision | ( | double | number, |
int | places | ||
) |
Returns a double greater than number to the specified number of places.
Definition at line 22 of file qgsserverprojectutils.cpp.
double QgsServerProjectUtils::floorWithPrecision | ( | double | number, |
int | places | ||
) |
Returns a double less than number to the specified number of places.
Definition at line 28 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceAbstract | ( | const QgsProject & | project | ) |
Returns the owsService abstract defined in project.
project | the QGIS project |
Definition at line 53 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceAccessConstraints | ( | const QgsProject & | project | ) |
Returns the owsService access constraints defined in project.
project | the QGIS project |
Definition at line 120 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::owsServiceCapabilities | ( | const QgsProject & | project | ) |
Returns if owsService capabilities are enabled.
project | the QGIS project |
Definition at line 34 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceContactMail | ( | const QgsProject & | project | ) |
Returns the owsService contact mail defined in project.
project | the QGIS project |
Definition at line 105 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceContactOrganization | ( | const QgsProject & | project | ) |
Returns the owsService contact organization defined in project.
project | the QGIS project |
Definition at line 90 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceContactPerson | ( | const QgsProject & | project | ) |
Returns the owsService contact person defined in project.
project | the QGIS project |
Definition at line 100 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceContactPhone | ( | const QgsProject & | project | ) |
Returns the owsService contact phone defined in project.
project | the QGIS project |
Definition at line 110 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceContactPosition | ( | const QgsProject & | project | ) |
Returns the owsService contact position defined in project.
project | the QGIS project |
Definition at line 95 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceFees | ( | const QgsProject & | project | ) |
Returns the owsService fees defined in project.
project | the QGIS project |
Definition at line 115 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::owsServiceKeywords | ( | const QgsProject & | project | ) |
Returns the owsService keywords defined in project.
project | the QGIS project |
Definition at line 58 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceOnlineResource | ( | const QgsProject & | project | ) |
Returns the owsService online resource defined in project.
project | the QGIS project |
Definition at line 76 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::owsServiceTitle | ( | const QgsProject & | project | ) |
Returns the owsService title defined in project.
project | the QGIS project |
Definition at line 39 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::serviceUrl | ( | const QString & | service, |
const QgsServerRequest & | request, | ||
const QgsServerSettings & | settings | ||
) |
Returns the service url defined in the environment variable or with HTTP header.
This is calculated from (in order of precedence):
QGIS_SERVER_<service>_SERVICE_URL
environment variableQGIS_SERVER_SERVICE_URL
environment variableX-Qgis-<service>-Service-Url
headerX-Qgis-Service-Url
headerForwarded
headerX-Forwarded-Host
and X-Forwarded-Proto
headersHost
header and the server protocolrequest | the request |
service | the used service |
settings | the server settings |
Definition at line 330 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wcsLayerIds | ( | const QgsProject & | project | ) |
Returns the Layer ids list defined in a QGIS project as published in WCS.
project | the QGIS project |
Definition at line 529 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wcsServiceUrl | ( | const QgsProject & | project, |
const QgsServerRequest & | request = QgsServerRequest() , |
||
const QgsServerSettings & | settings = QgsServerSettings() |
||
) |
Returns the WCS service url.
The URL defined in the project or if not defined the URL from serviceUrl.
project | the QGIS project |
request | the request |
settings | the server settings |
Definition at line 519 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wfsLayerIds | ( | const QgsProject & | project | ) |
Returns the Layer ids list defined in a QGIS project as published in WFS.
project | the QGIS project |
Definition at line 494 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wfsLayerPrecision | ( | const QgsProject & | project, |
const QString & | layerId | ||
) |
Returns the Layer precision defined in a QGIS project for the WFS GetFeature.
project | the QGIS project |
layerId | the layer id in the project |
Definition at line 499 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wfsServiceUrl | ( | const QgsProject & | project, |
const QgsServerRequest & | request = QgsServerRequest() , |
||
const QgsServerSettings & | settings = QgsServerSettings() |
||
) |
Returns the WFS service url.
The URL defined in the project or if not defined the URL from serviceUrl.
project | the QGIS project |
request | the request |
settings | the server settings |
Definition at line 484 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wfstDeleteLayerIds | ( | const QgsProject & | project | ) |
Returns the Layer ids list defined in a QGIS project as published as WFS-T with delete capabilities.
project | the QGIS project |
Definition at line 514 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wfstInsertLayerIds | ( | const QgsProject & | project | ) |
Returns the Layer ids list defined in a QGIS project as published as WFS-T with insert capabilities.
project | the QGIS project |
Definition at line 509 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wfstUpdateLayerIds | ( | const QgsProject & | project | ) |
Returns the Layer ids list defined in a QGIS project as published as WFS-T with update capabilities.
project | the QGIS project |
Definition at line 504 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsAddLegendGroupsLegendGraphic | ( | const QgsProject & | project | ) |
Returns if legend groups should be in the legend graphic response if GetLegendGraphic is called on a layer group.
project | the QGIS project |
Definition at line 191 of file qgsserverprojectutils.cpp.
double QgsServerProjectUtils::wmsDefaultMapUnitsPerMm | ( | const QgsProject & | project | ) |
Returns the default number of map units per millimeters in case of the scale is not given.
project | the QGIS project |
Definition at line 155 of file qgsserverprojectutils.cpp.
QgsRectangle QgsServerProjectUtils::wmsExtent | ( | const QgsProject & | project | ) |
Returns the WMS Extent restriction.
project | the QGIS project |
Definition at line 468 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsFeatureInfoAddWktGeometry | ( | const QgsProject & | project | ) |
Returns if the geometry is displayed as Well Known Text in GetFeatureInfo request.
project | the QGIS project |
Definition at line 168 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsFeatureInfoDocumentElement | ( | const QgsProject & | project | ) |
Returns the document element name for XML GetFeatureInfo request.
project | the QGIS project |
Definition at line 208 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsFeatureInfoDocumentElementNs | ( | const QgsProject & | project | ) |
Returns the document element namespace for XML GetFeatureInfo request.
project | the QGIS project |
Definition at line 213 of file qgsserverprojectutils.cpp.
QHash< QString, QString > QgsServerProjectUtils::wmsFeatureInfoLayerAliasMap | ( | const QgsProject & | project | ) |
Returns the mapping between layer name and wms layer name for GetFeatureInfo request.
project | the QGIS project |
Definition at line 223 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wmsFeatureInfoPrecision | ( | const QgsProject & | project | ) |
Returns the geometry precision for GetFeatureInfo request.
project | the QGIS project |
Definition at line 203 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsFeatureInfoSchema | ( | const QgsProject & | project | ) |
Returns the schema URL for XML GetFeatureInfo request.
project | the QGIS project |
Definition at line 218 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsFeatureInfoSegmentizeWktGeometry | ( | const QgsProject & | project | ) |
Returns if the geometry has to be segmentize in GetFeatureInfo request.
project | the QGIS project |
Definition at line 183 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsFeatureInfoUseAttributeFormSettings | ( | const QgsProject & | project | ) |
Returns if feature form settings should be considered for the format of the feature info response.
project | the QGIS project |
Definition at line 176 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wmsImageQuality | ( | const QgsProject & | project | ) |
Returns the quality for WMS images defined in a QGIS project.
project | the QGIS project |
Definition at line 140 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsInfoFormatSia2045 | ( | const QgsProject & | project | ) |
Returns if the info format is SIA20145.
project | the QGIS project |
Definition at line 160 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsInspireActivate | ( | const QgsProject & | project | ) |
Returns if Inspire is activated.
project | the QGIS project |
Definition at line 250 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsInspireLanguage | ( | const QgsProject & | project | ) |
Returns the Inspire language.
project | the QGIS project |
Definition at line 255 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsInspireMetadataDate | ( | const QgsProject & | project | ) |
Returns the Inspire metadata date.
project | the QGIS project |
Definition at line 275 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsInspireMetadataUrl | ( | const QgsProject & | project | ) |
Returns the Inspire metadata URL.
project | the QGIS project |
Definition at line 260 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsInspireMetadataUrlType | ( | const QgsProject & | project | ) |
Returns the Inspire metadata URL type.
project | the QGIS project |
Definition at line 265 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsInspireTemporalReference | ( | const QgsProject & | project | ) |
Returns the Inspire temporal reference.
project | the QGIS project |
Definition at line 270 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wmsMaxAtlasFeatures | ( | const QgsProject & | project | ) |
Returns the maximum number of atlas features which can be printed in a request.
project | the QGIS project |
Definition at line 150 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wmsMaxHeight | ( | const QgsProject & | project | ) |
Returns the maximum height for WMS images defined in a QGIS project.
project | the QGIS project |
Definition at line 130 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wmsMaxWidth | ( | const QgsProject & | project | ) |
Returns the maximum width for WMS images defined in a QGIS project.
project | the QGIS project |
Definition at line 125 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wmsOutputCrsList | ( | const QgsProject & | project | ) |
Returns the WMS output CRS list.
project | the QGIS project |
Definition at line 285 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsRenderMapTiles | ( | const QgsProject & | project | ) |
Returns true
if WMS requests should use the 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.
project | the QGIS project |
true
if the flag should be used, or false
if not.Definition at line 544 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wmsRestrictedComposers | ( | const QgsProject & | project | ) |
Returns the restricted composer list.
project | the QGIS project |
Definition at line 280 of file qgsserverprojectutils.cpp.
QStringList QgsServerProjectUtils::wmsRestrictedLayers | ( | const QgsProject & | project | ) |
Returns the restricted layer name list.
project | the QGIS project |
Definition at line 463 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsRootName | ( | const QgsProject & | project | ) |
Returns the WMS root layer name defined in a QGIS project.
project | the QGIS project |
Definition at line 458 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmsServiceUrl | ( | const QgsProject & | project, |
const QgsServerRequest & | request = QgsServerRequest() , |
||
const QgsServerSettings & | settings = QgsServerSettings() |
||
) |
Returns the WMS service url.
The URL defined in the project or if not defined the URL from serviceUrl.
project | the QGIS project |
request | the request |
settings | the server settings |
Definition at line 448 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsSkipNameForGroup | ( | const QgsProject & | project | ) |
Returns if name attribute should be skipped for groups in WMS capabilities document.
project | the QGIS project |
Definition at line 198 of file qgsserverprojectutils.cpp.
int QgsServerProjectUtils::wmsTileBuffer | ( | const QgsProject & | project | ) |
Returns the tile buffer in pixels for WMS images defined in a QGIS project.
project | the QGIS project |
Definition at line 145 of file qgsserverprojectutils.cpp.
bool QgsServerProjectUtils::wmsUseLayerIds | ( | const QgsProject & | project | ) |
Returns if layer ids are used as name in WMS.
project | the QGIS project |
Definition at line 135 of file qgsserverprojectutils.cpp.
QString QgsServerProjectUtils::wmtsServiceUrl | ( | const QgsProject & | project, |
const QgsServerRequest & | request = QgsServerRequest() , |
||
const QgsServerSettings & | settings = QgsServerSettings() |
||
) |
Returns the WMTS service url.
The URL defined in the project or if not defined the URL from serviceUrl.
project | the QGIS project |
request | the request |
settings | the server settings |
Definition at line 534 of file qgsserverprojectutils.cpp.