QGIS API Documentation 3.43.0-Master (b60ef06885e)
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
30class QgsProject;
31class QgsRectangle;
32
38class SERVER_EXPORT QgsServerProjectUtils
39{
40 public:
46 static double ceilWithPrecision( double number, int places ) SIP_SKIP;
47
53 static double floorWithPrecision( double number, int places ) SIP_SKIP;
54
60 static bool owsServiceCapabilities( const QgsProject &project );
61
67 static QString owsServiceTitle( const QgsProject &project );
68
74 static QString owsServiceAbstract( const QgsProject &project );
75
81 static QStringList owsServiceKeywords( const QgsProject &project );
82
88 static QString owsServiceOnlineResource( const QgsProject &project );
89
95 static QString owsServiceContactOrganization( const QgsProject &project );
96
102 static QString owsServiceContactPosition( const QgsProject &project );
103
109 static QString owsServiceContactPerson( const QgsProject &project );
110
116 static QString owsServiceContactMail( const QgsProject &project );
117
123 static QString owsServiceContactPhone( const QgsProject &project );
124
130 static QString owsServiceFees( const QgsProject &project );
131
137 static QString owsServiceAccessConstraints( const QgsProject &project );
138
144 static int wmsMaxWidth( const QgsProject &project );
145
151 static int wmsMaxHeight( const QgsProject &project );
152
158 static int wmsImageQuality( const QgsProject &project );
159
166 static int wmsTileBuffer( const QgsProject &project );
167
180 static bool wmsRenderMapTiles( const QgsProject &project );
181
187 static int wmsMaxAtlasFeatures( const QgsProject &project );
188
195 static double wmsDefaultMapUnitsPerMm( const QgsProject &project );
196
202 static bool wmsUseLayerIds( const QgsProject &project );
203
209 static bool wmsInfoFormatSia2045( const QgsProject &project );
210
216 static bool wmsFeatureInfoAddWktGeometry( const QgsProject &project );
217
223 static bool wmsFeatureInfoUseAttributeFormSettings( const QgsProject &project );
224
230 static bool wmsFeatureInfoSegmentizeWktGeometry( const QgsProject &project );
231
237 static bool wmsAddLegendGroupsLegendGraphic( const QgsProject &project );
238
245 static bool wmsSkipNameForGroup( const QgsProject &project );
246
252 static int wmsFeatureInfoPrecision( const QgsProject &project );
253
259 static QString wmsFeatureInfoDocumentElement( const QgsProject &project );
260
266 static QString wmsFeatureInfoDocumentElementNs( const QgsProject &project );
267
273 static QString wmsFeatureInfoSchema( const QgsProject &project );
274
280 static QHash<QString, QString> wmsFeatureInfoLayerAliasMap( const QgsProject &project );
281
287 static bool wmsInspireActivate( const QgsProject &project );
288
294 static QString wmsInspireLanguage( const QgsProject &project );
295
301 static QString wmsInspireMetadataUrl( const QgsProject &project );
302
308 static QString wmsInspireMetadataUrlType( const QgsProject &project );
309
315 static QString wmsInspireTemporalReference( const QgsProject &project );
316
322 static QString wmsInspireMetadataDate( const QgsProject &project );
323
329 static QStringList wmsRestrictedComposers( const QgsProject &project );
330
340 static QString wmsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
341
347 static QString wmsRootName( const QgsProject &project );
348
354 static QStringList wmsRestrictedLayers( const QgsProject &project );
355
361 static QStringList wmsOutputCrsList( const QgsProject &project );
362
368 static QgsRectangle wmsExtent( const QgsProject &project );
369
379 static QString wfsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
380
386 static QStringList wfsLayerIds( const QgsProject &project );
387
395 static int wfsLayerPrecision( const QgsProject &project, const QString &layerId );
396
402 static QStringList wfstUpdateLayerIds( const QgsProject &project );
403
409 static QStringList wfstInsertLayerIds( const QgsProject &project );
410
416 static QStringList wfstDeleteLayerIds( const QgsProject &project );
417
427 static QString wcsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
428
434 static QStringList wcsLayerIds( const QgsProject &project );
435
446 static QString wmtsServiceUrl( const QgsProject &project, const QgsServerRequest &request = QgsServerRequest(), const QgsServerSettings &settings = QgsServerSettings() );
447
468 static QString serviceUrl( const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings );
469};
470
471#endif
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
A rectangle specified with double values.
Contains utility functions to retrieve specific entries from a QgsProject.
Defines requests passed to QgsService classes.
Provides a way to retrieve settings by prioritizing according to environment variables,...
#define SIP_SKIP
Definition qgis_sip.h:126