Class: QgsServerProjectUtils¶
- class qgis.server.QgsServerProjectUtils¶
Bases:
sip.simplewrapper
Methods
Returns the owsService abstract defined in project.
Returns the owsService access constraints defined in project.
Returns if owsService capabilities are enabled.
Returns the owsService contact mail defined in project.
Returns the owsService contact organization defined in project.
Returns the owsService contact person defined in project.
Returns the owsService contact phone defined in project.
Returns the owsService contact position defined in project.
Returns the owsService fees defined in project.
Returns the owsService keywords defined in project.
Returns the owsService online resource defined in project.
Returns the owsService title defined in project.
Returns the service url defined in the environment variable or with HTTP header.
Returns the Layer ids list defined in a QGIS project as published in WCS.
Returns the WCS service url.
Returns the Layer ids list defined in a QGIS project as published in WFS.
Returns the Layer precision defined in a QGIS project for the WFS GetFeature.
Returns the WFS service url.
Returns the Layer ids list defined in a QGIS project as published as WFS-T with delete capabilities.
Returns the Layer ids list defined in a QGIS project as published as WFS-T with insert capabilities.
Returns the Layer ids list defined in a QGIS project as published as WFS-T with update capabilities.
Returns the default number of map units per millimeters in case of the scale is not given
Returns the WMS Extent restriction.
Returns if the geometry is displayed as Well Known Text in GetFeatureInfo request.
Returns the document element name for XML GetFeatureInfo request.
Returns the document element namespace for XML GetFeatureInfo request.
Returns the mapping between layer name and wms layer name for GetFeatureInfo request.
Returns the geometry precision for GetFeatureInfo request.
Returns the schema URL for XML GetFeatureInfo request.
Returns if the geometry has to be segmentize in GetFeatureInfo request.
Returns if feature form settings should be considered for the format of the feature info response
Returns the quality for WMS images defined in a QGIS project.
Returns if the info format is SIA20145.
Returns if Inspire is activated.
Returns the Inspire language.
Returns the Inspire metadata date.
Returns the Inspire metadata URL.
Returns the Inspire metadata URL type.
Returns the Inspire temporal reference.
Returns the maximum number of atlas features which can be printed in a request
Returns the maximum height for WMS images defined in a QGIS project.
Returns the maximum width for WMS images defined in a QGIS project.
Returns the WMS output CRS list.
Returns
True
if WMS requests should use theQgsMapSettings
.RenderMapTile flag, so that no visible artifacts are visible between adjacent tiles.Returns the restricted composer list.
Returns the restricted layer name list.
Returns the WMS root layer name defined in a QGIS project.
Returns the WMS service url.
Returns the tile buffer in pixels for WMS images defined in a QGIS project.
Returns if layer ids are used as name in WMS.
Returns the WMTS service url.
- owsServiceAbstract(project: QgsProject) str ¶
Returns the owsService abstract defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService abstract if defined in project.
- owsServiceAccessConstraints(project: QgsProject) str ¶
Returns the owsService access constraints defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService access constraints if defined in project.
- owsServiceCapabilities(project: QgsProject) bool ¶
Returns if owsService capabilities are enabled.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
if owsService capabilities are enabled.
- owsServiceContactMail(project: QgsProject) str ¶
Returns the owsService contact mail defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService contact mail if defined in project.
- owsServiceContactOrganization(project: QgsProject) str ¶
Returns the owsService contact organization defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService contact organization if defined in project.
- owsServiceContactPerson(project: QgsProject) str ¶
Returns the owsService contact person defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService contact person if defined in project.
- owsServiceContactPhone(project: QgsProject) str ¶
Returns the owsService contact phone defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService contact phone if defined in project.
- owsServiceContactPosition(project: QgsProject) str ¶
Returns the owsService contact position defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService contact position if defined in project.
- owsServiceFees(project: QgsProject) str ¶
Returns the owsService fees defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService fees if defined in project.
- owsServiceKeywords(project: QgsProject) List[str] ¶
Returns the owsService keywords defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the owsService keywords if defined in project.
- owsServiceOnlineResource(project: QgsProject) str ¶
Returns the owsService online resource defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService online resource if defined in project.
- owsServiceTitle(project: QgsProject) str ¶
Returns the owsService title defined in project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the owsService title if defined in project with project title as fallback, “Untitled” otherwise.
- serviceUrl(service: str, request: QgsServerRequest, settings: QgsServerSettings) str ¶
Returns the service url defined in the environment variable or with HTTP header. The is calculated from, in the order:
Value defined in the project per service.
The
<service>_SERVICE_URL
environment variable.The
SERVICE_URL
environment variable.The custom
X-Qgis-<service>-Servcie-Url
header.The custom
X-Qgis-Service-Url
header.Build form the standard
Forwarded
header.Build form the pseudo standard
X-Forwarded-Host
andX-Forwarded-Proto
headers.Build form the standard
Host
header and the server protocol.Build form the server name and the server protocol.
- Parameters:
request (QgsServerRequest) – the request
service (str) – the used service
settings (QgsServerSettings) – the server settings
- Return type:
str
- Returns:
url to use for this service
New in version 3.20.
- wcsLayerIds(project: QgsProject) List[str] ¶
Returns the Layer ids list defined in a QGIS project as published in WCS.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the Layer ids list.
- wcsServiceUrl(project: QgsProject, request: QgsServerRequest = QgsServerRequest(), settings: QgsServerSettings = QgsServerSettings()) str ¶
Returns the WCS service url. The URL defined in the project or if not defined the URL from serviceUrl.
- Parameters:
project (QgsProject) – the QGIS project
request (
QgsServerRequest
= QgsServerRequest()) – the requestsettings (
QgsServerSettings
= QgsServerSettings()) – the server settings
- Return type:
str
- Returns:
url to use for this service
- wfsLayerIds(project: QgsProject) List[str] ¶
Returns the Layer ids list defined in a QGIS project as published in WFS.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the Layer ids list.
- wfsLayerPrecision(project: QgsProject, layerId: str) int ¶
Returns the Layer precision defined in a QGIS project for the WFS GetFeature.
- Parameters:
project (QgsProject) – the QGIS project
layerId (str) – the layer id in the project
- Return type:
int
- Returns:
the layer precision for WFS GetFeature.
- wfsServiceUrl(project: QgsProject, request: QgsServerRequest = QgsServerRequest(), settings: QgsServerSettings = QgsServerSettings()) str ¶
Returns the WFS service url. The URL defined in the project or if not defined the URL from serviceUrl.
- Parameters:
project (QgsProject) – the QGIS project
request (
QgsServerRequest
= QgsServerRequest()) – the requestsettings (
QgsServerSettings
= QgsServerSettings()) – the server settings
- Return type:
str
- Returns:
url to use for this service
- wfstDeleteLayerIds(project: QgsProject) List[str] ¶
Returns the Layer ids list defined in a QGIS project as published as WFS-T with delete capabilities.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the Layer ids list.
- wfstInsertLayerIds(project: QgsProject) List[str] ¶
Returns the Layer ids list defined in a QGIS project as published as WFS-T with insert capabilities.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the Layer ids list.
- wfstUpdateLayerIds(project: QgsProject) List[str] ¶
Returns the Layer ids list defined in a QGIS project as published as WFS-T with update capabilities.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the Layer ids list.
- wmsDefaultMapUnitsPerMm(project: QgsProject) float ¶
Returns the default number of map units per millimeters in case of the scale is not given
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
float
- Returns:
the default number of map units per millimeter
New in version 3.4.
- wmsExtent(project: QgsProject) QgsRectangle ¶
Returns the WMS Extent restriction.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
- Returns:
the WMS Extent restriction.
- wmsFeatureInfoAddWktGeometry(project: QgsProject) bool ¶
Returns if the geometry is displayed as Well Known Text in GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
if the geometry is displayed as Well Known Text in GetFeatureInfo request.
- wmsFeatureInfoDocumentElement(project: QgsProject) str ¶
Returns the document element name for XML GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the document element name for XML GetFeatureInfo request.
- wmsFeatureInfoDocumentElementNs(project: QgsProject) str ¶
Returns the document element namespace for XML GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the document element namespace for XML GetFeatureInfo request.
- wmsFeatureInfoLayerAliasMap(project: QgsProject) Dict[str, str] ¶
Returns the mapping between layer name and wms layer name for GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
Dict[str, str]
- Returns:
the mapping between layer name and wms layer name for GetFeatureInfo request.
- wmsFeatureInfoPrecision(project: QgsProject) int ¶
Returns the geometry precision for GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
int
- Returns:
the geometry precision for GetFeatureInfo request.
- wmsFeatureInfoSchema(project: QgsProject) str ¶
Returns the schema URL for XML GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the schema URL for XML GetFeatureInfo request.
- wmsFeatureInfoSegmentizeWktGeometry(project: QgsProject) bool ¶
Returns if the geometry has to be segmentize in GetFeatureInfo request.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
if the geometry has to be segmentize in GetFeatureInfo request.
- wmsFeatureInfoUseAttributeFormSettings(project: QgsProject) bool ¶
Returns if feature form settings should be considered for the format of the feature info response
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
true if the feature form settings shall be considered for the feature info response
- wmsImageQuality(project: QgsProject) int ¶
Returns the quality for WMS images defined in a QGIS project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
int
- Returns:
quality if defined in project, -1 otherwise.
- wmsInfoFormatSia2045(project: QgsProject) bool ¶
Returns if the info format is SIA20145.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
if the info format is SIA20145.
- wmsInspireActivate(project: QgsProject) bool ¶
Returns if Inspire is activated.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
if Inspire is activated.
- wmsInspireLanguage(project: QgsProject) str ¶
Returns the Inspire language.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the Inspire language if defined in project.
- wmsInspireMetadataDate(project: QgsProject) str ¶
Returns the Inspire metadata date.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the Inspire metadata date if defined in project.
- wmsInspireMetadataUrl(project: QgsProject) str ¶
Returns the Inspire metadata URL.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the Inspire metadata URL if defined in project.
- wmsInspireMetadataUrlType(project: QgsProject) str ¶
Returns the Inspire metadata URL type.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the Inspire metadata URL type if defined in project.
- wmsInspireTemporalReference(project: QgsProject) str ¶
Returns the Inspire temporal reference.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
the Inspire temporal reference if defined in project.
- wmsMaxAtlasFeatures(project: QgsProject) int ¶
Returns the maximum number of atlas features which can be printed in a request
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
int
- Returns:
the number of atlas features
- wmsMaxHeight(project: QgsProject) int ¶
Returns the maximum height for WMS images defined in a QGIS project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
int
- Returns:
height if defined in project, -1 otherwise.
- wmsMaxWidth(project: QgsProject) int ¶
Returns the maximum width for WMS images defined in a QGIS project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
int
- Returns:
width if defined in project, -1 otherwise.
- wmsOutputCrsList(project: QgsProject) List[str] ¶
Returns the WMS output CRS list.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the WMS output CRS list.
- wmsRenderMapTiles(project: QgsProject) bool ¶
Returns
True
if WMS requests should use theQgsMapSettings
.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.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
True
if the flag should be used, orFalse
if not.
New in version 3.18.
- wmsRestrictedComposers(project: QgsProject) List[str] ¶
Returns the restricted composer list.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the restricted composer list if defined in project.
- wmsRestrictedLayers(project: QgsProject) List[str] ¶
Returns the restricted layer name list.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
List[str]
- Returns:
the restricted layer name list if defined in project.
- wmsRootName(project: QgsProject) str ¶
Returns the WMS root layer name defined in a QGIS project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
str
- Returns:
root layer name to use for this service
- wmsServiceUrl(project: QgsProject, request: QgsServerRequest = QgsServerRequest(), settings: QgsServerSettings = QgsServerSettings()) str ¶
Returns the WMS service url. The URL defined in the project or if not defined the URL from serviceUrl.
- Parameters:
project (QgsProject) – the QGIS project
request (
QgsServerRequest
= QgsServerRequest()) – the requestsettings (
QgsServerSettings
= QgsServerSettings()) – the server settings
- Return type:
str
- Returns:
url to use for this service
- wmsTileBuffer(project: QgsProject) int ¶
Returns the tile buffer in pixels for WMS images defined in a QGIS project.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
int
- Returns:
tile buffer if defined in project, 0 otherwise.
New in version 3.10.
- wmsUseLayerIds(project: QgsProject) bool ¶
Returns if layer ids are used as name in WMS.
- Parameters:
project (QgsProject) – the QGIS project
- Return type:
bool
- Returns:
if layer ids are used as name.
- wmtsServiceUrl(project: QgsProject, request: QgsServerRequest = QgsServerRequest(), settings: QgsServerSettings = QgsServerSettings()) str ¶
Returns the WMTS service url. The URL defined in the project or if not defined the URL from serviceUrl.
- Parameters:
project (QgsProject) – the QGIS project
request (
QgsServerRequest
= QgsServerRequest()) – the requestsettings (
QgsServerSettings
= QgsServerSettings()) – the server settings
- Return type:
str
- Returns:
url to use for this service
New in version 3.4.