QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgsserverprojectutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsserverprojectutils.h
3  -----------------------
4  begin : December 19, 2016
5  copyright : (C) 2016 by Paul Blottiere
6  email : paul dot blottiere at oslandia dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSSERVERPROJECTUTILS_H
19 #define QGSSERVERPROJECTUTILS_H
20 
21 #include <QString>
22 #include <QHash>
23 #include <cmath>
24 
25 #include "qgis_server.h"
26 #include "qgis_sip.h"
27 #include "qgsserverrequest.h"
28 #include "qgsserversettings.h"
29 
30 class QgsProject;
31 class QgsRectangle;
32 
33 #ifdef SIP_RUN
34 % ModuleHeaderCode
35 #include "qgsserverprojectutils.h"
36 % End
37 #endif
38 
39 
47 {
48 
54  SERVER_EXPORT double ceilWithPrecision( double number, int places ) SIP_SKIP;
55 
61  SERVER_EXPORT double floorWithPrecision( double number, int places ) SIP_SKIP;
62 
68  SERVER_EXPORT bool owsServiceCapabilities( const QgsProject &project );
69 
75  SERVER_EXPORT QString owsServiceTitle( const QgsProject &project );
76 
82  SERVER_EXPORT QString owsServiceAbstract( const QgsProject &project );
83 
89  SERVER_EXPORT QStringList owsServiceKeywords( const QgsProject &project );
90 
96  SERVER_EXPORT QString owsServiceOnlineResource( const QgsProject &project );
97 
103  SERVER_EXPORT QString owsServiceContactOrganization( const QgsProject &project );
104 
110  SERVER_EXPORT QString owsServiceContactPosition( const QgsProject &project );
111 
117  SERVER_EXPORT QString owsServiceContactPerson( const QgsProject &project );
118 
124  SERVER_EXPORT QString owsServiceContactMail( const QgsProject &project );
125 
131  SERVER_EXPORT QString owsServiceContactPhone( const QgsProject &project );
132 
138  SERVER_EXPORT QString owsServiceFees( const QgsProject &project );
139 
145  SERVER_EXPORT QString owsServiceAccessConstraints( const QgsProject &project );
146 
152  SERVER_EXPORT int wmsMaxWidth( const QgsProject &project );
153 
159  SERVER_EXPORT int wmsMaxHeight( const QgsProject &project );
160 
166  SERVER_EXPORT int wmsImageQuality( const QgsProject &project );
167 
174  SERVER_EXPORT int wmsTileBuffer( const QgsProject &project );
175 
188  SERVER_EXPORT bool wmsRenderMapTiles( const QgsProject &project );
189 
195  SERVER_EXPORT int wmsMaxAtlasFeatures( const QgsProject &project );
196 
203  SERVER_EXPORT double wmsDefaultMapUnitsPerMm( const QgsProject &project );
204 
210  SERVER_EXPORT bool wmsUseLayerIds( const QgsProject &project );
211 
217  SERVER_EXPORT bool wmsInfoFormatSia2045( const QgsProject &project );
218 
224  SERVER_EXPORT bool wmsFeatureInfoAddWktGeometry( const QgsProject &project );
225 
231  SERVER_EXPORT bool wmsFeatureInfoUseAttributeFormSettings( const QgsProject &project );
232 
238  SERVER_EXPORT bool wmsFeatureInfoSegmentizeWktGeometry( const QgsProject &project );
239 
245  SERVER_EXPORT int wmsFeatureInfoPrecision( const QgsProject &project );
246 
252  SERVER_EXPORT QString wmsFeatureInfoDocumentElement( const QgsProject &project );
253 
259  SERVER_EXPORT QString wmsFeatureInfoDocumentElementNs( const QgsProject &project );
260 
266  SERVER_EXPORT QString wmsFeatureInfoSchema( const QgsProject &project );
267 
273  SERVER_EXPORT QHash<QString, QString> wmsFeatureInfoLayerAliasMap( const QgsProject &project );
274 
280  SERVER_EXPORT bool wmsInspireActivate( const QgsProject &project );
281 
287  SERVER_EXPORT QString wmsInspireLanguage( const QgsProject &project );
288 
294  SERVER_EXPORT QString wmsInspireMetadataUrl( const QgsProject &project );
295 
301  SERVER_EXPORT QString wmsInspireMetadataUrlType( const QgsProject &project );
302 
308  SERVER_EXPORT QString wmsInspireTemporalReference( const QgsProject &project );
309 
315  SERVER_EXPORT QString wmsInspireMetadataDate( const QgsProject &project );
316 
322  SERVER_EXPORT QStringList wmsRestrictedComposers( const QgsProject &project );
323 
333  SERVER_EXPORT QString wmsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
334 
340  SERVER_EXPORT QString wmsRootName( const QgsProject &project );
341 
347  SERVER_EXPORT QStringList wmsRestrictedLayers( const QgsProject &project );
348 
354  SERVER_EXPORT QStringList wmsOutputCrsList( const QgsProject &project );
355 
361  SERVER_EXPORT QgsRectangle wmsExtent( const QgsProject &project );
362 
372  SERVER_EXPORT QString wfsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
373 
379  SERVER_EXPORT QStringList wfsLayerIds( const QgsProject &project );
380 
388  SERVER_EXPORT int wfsLayerPrecision( const QgsProject &project, const QString &layerId );
389 
395  SERVER_EXPORT QStringList wfstUpdateLayerIds( const QgsProject &project );
396 
402  SERVER_EXPORT QStringList wfstInsertLayerIds( const QgsProject &project );
403 
409  SERVER_EXPORT QStringList wfstDeleteLayerIds( const QgsProject &project );
410 
420  SERVER_EXPORT QString wcsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
421 
427  SERVER_EXPORT QStringList wcsLayerIds( const QgsProject &project );
428 
439  SERVER_EXPORT QString wmtsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
440 
461  SERVER_EXPORT QString serviceUrl( const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings );
462 };
463 
464 #endif
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:101
A rectangle specified with double values.
Definition: qgsrectangle.h:42
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Provides a way to retrieve settings by prioritizing according to environment variables,...
The QgsServerProjectUtils namespace provides a way to retrieve specific entries from a QgsProject.
SERVER_EXPORT QString wmsFeatureInfoSchema(const QgsProject &project)
Returns the schema URL for XML GetFeatureInfo request.
SERVER_EXPORT int wmsTileBuffer(const QgsProject &project)
Returns the tile buffer in pixels for WMS images defined in a QGIS project.
SERVER_EXPORT QString wcsServiceUrl(const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings())
Returns the WCS service url.
SERVER_EXPORT QString wmsRootName(const QgsProject &project)
Returns the WMS root layer name defined in a QGIS project.
SERVER_EXPORT bool wmsInfoFormatSia2045(const QgsProject &project)
Returns if the info format is SIA20145.
SERVER_EXPORT QString wmsInspireMetadataUrl(const QgsProject &project)
Returns the Inspire metadata URL.
SERVER_EXPORT QString wmtsServiceUrl(const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings())
Returns the WMTS service url.
SERVER_EXPORT int wmsFeatureInfoPrecision(const QgsProject &project)
Returns the geometry precision for GetFeatureInfo request.
SERVER_EXPORT double ceilWithPrecision(double number, int places)
Returns a double greater than number to the specified number of places.
SERVER_EXPORT QString wmsFeatureInfoDocumentElementNs(const QgsProject &project)
Returns the document element namespace for XML GetFeatureInfo request.
SERVER_EXPORT QStringList wmsRestrictedComposers(const QgsProject &project)
Returns the restricted composer list.
SERVER_EXPORT QgsRectangle wmsExtent(const QgsProject &project)
Returns the WMS Extent restriction.
SERVER_EXPORT bool wmsUseLayerIds(const QgsProject &project)
Returns if layer ids are used as name in WMS.
SERVER_EXPORT bool wmsFeatureInfoSegmentizeWktGeometry(const QgsProject &project)
Returns if the geometry has to be segmentize in GetFeatureInfo request.
SERVER_EXPORT QString owsServiceAccessConstraints(const QgsProject &project)
Returns the owsService access constraints defined in project.
SERVER_EXPORT QStringList wfsLayerIds(const QgsProject &project)
Returns the Layer ids list defined in a QGIS project as published in WFS.
SERVER_EXPORT bool wmsRenderMapTiles(const QgsProject &project)
Returns true if WMS requests should use the QgsMapSettings::RenderMapTile flag, so that no visible ar...
SERVER_EXPORT QString owsServiceOnlineResource(const QgsProject &project)
Returns the owsService online resource 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 owsServiceContactPosition(const QgsProject &project)
Returns the owsService contact position defined in project.
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 wmsFeatureInfoUseAttributeFormSettings(const QgsProject &project)
Returns if feature form settings should be considered for the format of the feature info response.
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 wfstInsertLayerIds(const QgsProject &project)
Returns the Layer ids list defined in a QGIS project as published as WFS-T with insert capabilities.
SERVER_EXPORT QString wmsInspireTemporalReference(const QgsProject &project)
Returns the Inspire temporal reference.
SERVER_EXPORT QStringList wmsOutputCrsList(const QgsProject &project)
Returns the WMS output CRS list.
SERVER_EXPORT QString wmsInspireMetadataDate(const QgsProject &project)
Returns the Inspire metadata date.
SERVER_EXPORT QString owsServiceContactOrganization(const QgsProject &project)
Returns the owsService contact organization defined in project.
SERVER_EXPORT QHash< QString, QString > wmsFeatureInfoLayerAliasMap(const QgsProject &project)
Returns the mapping between layer name and wms layer name for GetFeatureInfo request.
SERVER_EXPORT bool wmsFeatureInfoAddWktGeometry(const QgsProject &project)
Returns if the geometry is displayed as Well Known Text in GetFeatureInfo request.
SERVER_EXPORT QString wmsServiceUrl(const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings())
Returns the WMS service url.
SERVER_EXPORT QStringList wmsRestrictedLayers(const QgsProject &project)
Returns the restricted layer name list.
SERVER_EXPORT int wmsImageQuality(const QgsProject &project)
Returns the quality for WMS images defined in a QGIS project.
SERVER_EXPORT QString wmsInspireLanguage(const QgsProject &project)
Returns the Inspire language.
SERVER_EXPORT QString wmsInspireMetadataUrlType(const QgsProject &project)
Returns the Inspire metadata URL type.
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 bool owsServiceCapabilities(const QgsProject &project)
Returns if owsService capabilities are enabled.
SERVER_EXPORT bool wmsInspireActivate(const QgsProject &project)
Returns if Inspire is activated.
SERVER_EXPORT int wmsMaxWidth(const QgsProject &project)
Returns the maximum width for WMS images defined in a QGIS project.
SERVER_EXPORT QString owsServiceTitle(const QgsProject &project)
Returns the owsService title defined in project.
SERVER_EXPORT QString owsServiceContactMail(const QgsProject &project)
Returns the owsService contact mail defined in project.
SERVER_EXPORT QString owsServiceAbstract(const QgsProject &project)
Returns the owsService abstract defined in project.
SERVER_EXPORT double floorWithPrecision(double number, int places)
Returns a double less than number to the specified number of places.
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 QString wfsServiceUrl(const QgsProject &project, const QgsServerRequest &request=QgsServerRequest(), const QgsServerSettings &settings=QgsServerSettings())
Returns the WFS service url.
SERVER_EXPORT int wmsMaxHeight(const QgsProject &project)
Returns the maximum height for WMS images defined in a QGIS project.
SERVER_EXPORT QStringList wcsLayerIds(const QgsProject &project)
Returns the Layer ids list defined in a QGIS project as published in WCS.
SERVER_EXPORT QString wmsFeatureInfoDocumentElement(const QgsProject &project)
Returns the document element name for XML GetFeatureInfo request.
SERVER_EXPORT int wmsMaxAtlasFeatures(const QgsProject &project)
Returns the maximum number of atlas features which can be printed in a request.
SERVER_EXPORT QString owsServiceContactPhone(const QgsProject &project)
Returns the owsService contact phone defined in project.
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 owsServiceContactPerson(const QgsProject &project)
Returns the owsService contact person defined in project.
#define SIP_SKIP
Definition: qgis_sip.h:126