QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsserverprojectutils.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsserverprojectutils.cpp
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
19#include "qgsproject.h"
20#include "qgsmessagelog.h"
21
22double QgsServerProjectUtils::ceilWithPrecision( double number, int places )
23{
24 const double scaleFactor = std::pow( 10.0, places );
25 return ( std::ceil( number * scaleFactor ) / scaleFactor );
26}
27
28double QgsServerProjectUtils::floorWithPrecision( double number, int places )
29{
30 const double scaleFactor = std::pow( 10.0, places );
31 return ( std::floor( number * scaleFactor ) / scaleFactor );
32}
33
35{
36 return project.readBoolEntry( QStringLiteral( "WMSServiceCapabilities" ), QStringLiteral( "/" ), false );
37}
38
40{
41 QString title = project.readEntry( QStringLiteral( "WMSServiceTitle" ), QStringLiteral( "/" ) );
42 if ( title.isEmpty() )
43 {
44 title = project.title();
45 }
46 if ( title.isEmpty() )
47 {
48 title = QObject::tr( "Untitled" );
49 }
50 return title;
51}
52
54{
55 return project.readEntry( QStringLiteral( "WMSServiceAbstract" ), QStringLiteral( "/" ) );
56}
57
59{
60 QStringList keywordList;
61 const QStringList list = project.readListEntry( QStringLiteral( "WMSKeywordList" ), QStringLiteral( "/" ), QStringList() );
62 if ( !list.isEmpty() )
63 {
64 for ( int i = 0; i < list.size(); ++i )
65 {
66 const QString keyword = list.at( i );
67 if ( !keyword.isEmpty() )
68 {
69 keywordList.append( keyword );
70 }
71 }
72 }
73 return keywordList;
74}
75
77{
78 QString wmsOnlineResource = project.readEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ) );
79
81 if ( wmsOnlineResourceProperty.isActive() && !wmsOnlineResourceProperty.expressionString().isEmpty() )
82 {
83 const QgsExpressionContext context = project.createExpressionContext();
84 return wmsOnlineResourceProperty.valueAsString( context, wmsOnlineResource );
85 }
86
87 return wmsOnlineResource;
88}
89
91{
92 return project.readEntry( QStringLiteral( "WMSContactOrganization" ), QStringLiteral( "/" ) );
93}
94
96{
97 return project.readEntry( QStringLiteral( "WMSContactPosition" ), QStringLiteral( "/" ) );
98}
99
101{
102 return project.readEntry( QStringLiteral( "WMSContactPerson" ), QStringLiteral( "/" ) );
103}
104
106{
107 return project.readEntry( QStringLiteral( "WMSContactMail" ), QStringLiteral( "/" ) );
108}
109
111{
112 return project.readEntry( QStringLiteral( "WMSContactPhone" ), QStringLiteral( "/" ) );
113}
114
116{
117 return project.readEntry( QStringLiteral( "WMSFees" ), QStringLiteral( "/" ) );
118}
119
121{
122 return project.readEntry( QStringLiteral( "WMSAccessConstraints" ), QStringLiteral( "/" ) );
123}
124
126{
127 return project.readNumEntry( QStringLiteral( "WMSMaxWidth" ), QStringLiteral( "/" ), -1 );
128}
129
131{
132 return project.readNumEntry( QStringLiteral( "WMSMaxHeight" ), QStringLiteral( "/" ), -1 );
133}
134
136{
137 return project.readBoolEntry( QStringLiteral( "WMSUseLayerIDs" ), QStringLiteral( "/" ), false );
138}
139
141{
142 return project.readNumEntry( QStringLiteral( "WMSImageQuality" ), QStringLiteral( "/" ), -1 );
143}
144
146{
147 return project.readNumEntry( QStringLiteral( "WMSTileBuffer" ), QStringLiteral( "/" ), 0 );
148}
149
151{
152 return project.readNumEntry( QStringLiteral( "WMSMaxAtlasFeatures" ), QStringLiteral( "/" ), 1 );
153}
154
156{
157 return project.readDoubleEntry( QStringLiteral( "WMSDefaultMapUnitsPerMm" ), QStringLiteral( "/" ), 1 );
158}
159
161{
162 const QString sia2045 = project.readEntry( QStringLiteral( "WMSInfoFormatSIA2045" ), QStringLiteral( "/" ), "" );
163
164 return sia2045.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
165 || sia2045.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
166}
167
169{
170 const QString wktGeom = project.readEntry( QStringLiteral( "WMSAddWktGeometry" ), QStringLiteral( "/" ), "" );
171
172 return wktGeom.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
173 || wktGeom.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
174}
175
177{
178 const QString useFormSettings = project.readEntry( QStringLiteral( "WMSFeatureInfoUseAttributeFormSettings" ), QStringLiteral( "/" ), "" );
179 return useFormSettings.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
180 || useFormSettings.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
181}
182
184{
185 const QString segmGeom = project.readEntry( QStringLiteral( "WMSSegmentizeFeatureInfoGeometry" ), QStringLiteral( "/" ), "" );
186
187 return segmGeom.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
188 || segmGeom.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
189}
190
192{
193 const QString legendGroups = project.readEntry( QStringLiteral( "WMSAddLayerGroupsLegendGraphic" ), QStringLiteral( "/" ), "" );
194 return legendGroups.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
195 || legendGroups.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
196}
197
199{
200 return project.readBoolEntry( QStringLiteral( "WMSSkipNameForGroup" ), QStringLiteral( "/" ), false );
201}
202
204{
205 return project.readNumEntry( QStringLiteral( "WMSPrecision" ), QStringLiteral( "/" ), 6 );
206}
207
209{
210 return project.readEntry( QStringLiteral( "WMSFeatureInfoDocumentElement" ), QStringLiteral( "/" ), "" );
211}
212
214{
215 return project.readEntry( QStringLiteral( "WMSFeatureInfoDocumentElementNS" ), QStringLiteral( "/" ), "" );
216}
217
219{
220 return project.readEntry( QStringLiteral( "WMSFeatureInfoSchema" ), QStringLiteral( "/" ), "" );
221}
222
223QHash<QString, QString> QgsServerProjectUtils::wmsFeatureInfoLayerAliasMap( const QgsProject &project )
224{
225 QHash<QString, QString> aliasMap;
226
227 //WMSFeatureInfoAliasLayers
228 const QStringList aliasLayerStringList = project.readListEntry( QStringLiteral( "WMSFeatureInfoAliasLayers" ), QStringLiteral( "/value" ), QStringList() );
229 if ( aliasLayerStringList.isEmpty() )
230 {
231 return aliasMap;
232 }
233
234 //WMSFeatureInfoLayerAliases
235 const QStringList layerAliasStringList = project.readListEntry( QStringLiteral( "WMSFeatureInfoLayerAliases" ), QStringLiteral( "/value" ), QStringList() );
236 if ( layerAliasStringList.isEmpty() )
237 {
238 return aliasMap;
239 }
240
241 const int nMapEntries = std::min( aliasLayerStringList.size(), layerAliasStringList.size() );
242 for ( int i = 0; i < nMapEntries; ++i )
243 {
244 aliasMap.insert( aliasLayerStringList.at( i ), layerAliasStringList.at( i ) );
245 }
246
247 return aliasMap;
248}
249
251{
252 return project.readBoolEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/activated" ) );
253}
254
256{
257 return project.readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/language" ) );
258}
259
261{
262 return project.readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataUrl" ) );
263}
264
266{
267 return project.readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataUrlType" ) );
268}
269
271{
272 return project.readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/temporalReference" ) );
273}
274
276{
277 return project.readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataDate" ) );
278}
279
281{
282 return project.readListEntry( QStringLiteral( "WMSRestrictedComposers" ), QStringLiteral( "/" ), QStringList() );
283}
284
286{
287 QStringList crsList;
288 const QStringList wmsCrsList = project.readListEntry( QStringLiteral( "WMSCrsList" ), QStringLiteral( "/" ), QStringList() );
289 if ( !wmsCrsList.isEmpty() )
290 {
291 for ( int i = 0; i < wmsCrsList.size(); ++i )
292 {
293 const QString crs = wmsCrsList.at( i );
294 if ( !crs.isEmpty() )
295 {
296 crsList.append( crs );
297 }
298 }
299 }
300 if ( crsList.isEmpty() )
301 {
302 const QStringList valueList = project.readListEntry( QStringLiteral( "WMSEpsgList" ), QStringLiteral( "/" ), QStringList() );
303 bool conversionOk;
304 for ( int i = 0; i < valueList.size(); ++i )
305 {
306 const int epsgNr = valueList.at( i ).toInt( &conversionOk );
307 if ( conversionOk )
308 {
309 crsList.append( QStringLiteral( "EPSG:%1" ).arg( epsgNr ) );
310 }
311 }
312 }
313 if ( crsList.isEmpty() )
314 {
315 //no CRS restriction defined in the project. Provide project CRS, wgs84 and pseudo mercator
316 const QString projectCrsId = project.crs().authid();
317 crsList.append( projectCrsId );
318 if ( projectCrsId.compare( QLatin1String( "EPSG:4326" ), Qt::CaseInsensitive ) != 0 )
319 {
320 crsList.append( QStringLiteral( "EPSG:%1" ).arg( 4326 ) );
321 }
322 if ( projectCrsId.compare( QLatin1String( "EPSG:3857" ), Qt::CaseInsensitive ) != 0 )
323 {
324 crsList.append( QStringLiteral( "EPSG:%1" ).arg( 3857 ) );
325 }
326 }
327 return crsList;
328}
329
330QString QgsServerProjectUtils::serviceUrl( const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings )
331{
332 const QString serviceUpper = service.toUpper();
333 QString url = settings.serviceUrl( serviceUpper );
334 if ( !url.isEmpty() )
335 {
336 return url;
337 }
338
340 if ( serviceUpper == QLatin1String( "WMS" ) )
341 {
343 }
344 else if ( serviceUpper == QLatin1String( "WFS" ) )
345 {
347 }
348 else if ( serviceUpper == QLatin1String( "WCS" ) )
349 {
351 }
352 else if ( serviceUpper == QLatin1String( "WMTS" ) )
353 {
355 }
356 url = request.header( header );
357 if ( !url.isEmpty() )
358 {
359 return url;
360 }
362 if ( !url.isEmpty() )
363 {
364 return url;
365 }
366
367 QString proto;
368 QString host;
369
370 QString forwarded = request.header( QgsServerRequest::FORWARDED );
371 if ( !forwarded.isEmpty() )
372 {
373 forwarded = forwarded.split( QLatin1Char( ',' ) )[0];
374 const QStringList elements = forwarded.split( ';' );
375 for ( const QString &element : elements )
376 {
377 QStringList splited_element = element.trimmed().split( QLatin1Char( '=' ) );
378 if ( splited_element[0] == "host" )
379 {
380 host = splited_element[1];
381 }
382 if ( splited_element[0] == "proto" )
383 {
384 proto = splited_element[1];
385 }
386 }
387 }
388
389 if ( host.isEmpty() )
390 {
393 }
394
395 if ( host.isEmpty() )
396 {
398 }
399
400 QUrl urlQUrl = request.baseUrl();
401 if ( !proto.isEmpty() )
402 {
403 urlQUrl.setScheme( proto );
404 }
405
406 if ( !host.isEmpty() )
407 {
408 QStringList hostPort = host.split( QLatin1Char( ':' ) );
409 if ( hostPort.length() == 1 )
410 {
411 urlQUrl.setHost( hostPort[0] );
412 urlQUrl.setPort( -1 );
413 }
414 if ( hostPort.length() == 2 )
415 {
416 urlQUrl.setHost( hostPort[0] );
417 urlQUrl.setPort( hostPort[1].toInt() );
418 }
419 }
420
421 // https://docs.qgis.org/3.16/en/docs/server_manual/services.html#wms-map
422 const QUrlQuery query { request.originalUrl().query() };
423 const QList<QPair<QString, QString>> constItems { query.queryItems() };
424 QString map;
425 for ( const QPair<QString, QString> &item : std::as_const( constItems ) )
426 {
427 if ( 0 == item.first.compare( QLatin1String( "MAP" ), Qt::CaseSensitivity::CaseInsensitive ) )
428 {
429 map = item.second;
430 break;
431 }
432 }
433
434 if ( !map.isEmpty() )
435 {
436 QUrlQuery query;
437 query.setQueryItems( { { "MAP", map } } );
438 urlQUrl.setQuery( query );
439 }
440 else
441 {
442 urlQUrl.setQuery( NULL );
443 }
444
445 return urlQUrl.url();
446}
447
448QString QgsServerProjectUtils::wmsServiceUrl( const QgsProject &project, const QgsServerRequest &request, const QgsServerSettings &settings )
449{
450 QString url = project.readEntry( QStringLiteral( "WMSUrl" ), QStringLiteral( "/" ), "" );
451 if ( url.isEmpty() )
452 {
453 url = serviceUrl( QStringLiteral( "WMS" ), request, settings );
454 }
455 return url;
456}
457
459{
460 return project.readEntry( QStringLiteral( "WMSRootName" ), QStringLiteral( "/" ), "" );
461}
462
464{
465 return project.readListEntry( QStringLiteral( "WMSRestrictedLayers" ), QStringLiteral( "/" ), QStringList() );
466}
467
469{
470 bool ok = false;
471 QStringList values = project.readListEntry( QStringLiteral( "WMSExtent" ), QStringLiteral( "/" ), QStringList(), &ok );
472 if ( !ok || values.size() != 4 )
473 {
474 return QgsRectangle();
475 }
476 //order of value elements must be xmin, ymin, xmax, ymax
477 const double xmin = values[0].toDouble();
478 const double ymin = values[1].toDouble();
479 const double xmax = values[2].toDouble();
480 const double ymax = values[3].toDouble();
481 return QgsRectangle( xmin, ymin, xmax, ymax );
482}
483
484QString QgsServerProjectUtils::wfsServiceUrl( const QgsProject &project, const QgsServerRequest &request, const QgsServerSettings &settings )
485{
486 QString url = project.readEntry( QStringLiteral( "WFSUrl" ), QStringLiteral( "/" ), "" );
487 if ( url.isEmpty() )
488 {
489 url = serviceUrl( QStringLiteral( "WFS" ), request, settings );
490 }
491 return url;
492}
493
495{
496 return project.readListEntry( QStringLiteral( "WFSLayers" ), QStringLiteral( "/" ) );
497}
498
499int QgsServerProjectUtils::wfsLayerPrecision( const QgsProject &project, const QString &layerId )
500{
501 return project.readNumEntry( QStringLiteral( "WFSLayersPrecision" ), "/" + layerId, 6 );
502}
503
505{
506 return project.readListEntry( QStringLiteral( "WFSTLayers" ), QStringLiteral( "Update" ) );
507}
508
510{
511 return project.readListEntry( QStringLiteral( "WFSTLayers" ), QStringLiteral( "Insert" ) );
512}
513
515{
516 return project.readListEntry( QStringLiteral( "WFSTLayers" ), QStringLiteral( "Delete" ) );
517}
518
519QString QgsServerProjectUtils::wcsServiceUrl( const QgsProject &project, const QgsServerRequest &request, const QgsServerSettings &settings )
520{
521 QString url = project.readEntry( QStringLiteral( "WCSUrl" ), QStringLiteral( "/" ), "" );
522 if ( url.isEmpty() )
523 {
524 url = serviceUrl( QStringLiteral( "WCS" ), request, settings );
525 }
526 return url;
527}
528
530{
531 return project.readListEntry( QStringLiteral( "WCSLayers" ), QStringLiteral( "/" ) );
532}
533
534QString QgsServerProjectUtils::wmtsServiceUrl( const QgsProject &project, const QgsServerRequest &request, const QgsServerSettings &settings )
535{
536 QString url = project.readEntry( QStringLiteral( "WMTSUrl" ), QStringLiteral( "/" ), "" );
537 if ( url.isEmpty() )
538 {
539 url = serviceUrl( QStringLiteral( "WMTS" ), request, settings );
540 }
541 return url;
542}
543
545{
546 return project.readBoolEntry( QStringLiteral( "RenderMapTile" ), QStringLiteral( "/" ), false );
547}
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
int readNumEntry(const QString &scope, const QString &key, int def=0, bool *ok=nullptr) const
Reads an integer from the specified scope and key.
QString title() const
Returns the project's title.
QgsPropertyCollection dataDefinedServerProperties() const
Returns the data defined properties used for overrides in user defined server parameters.
QgsExpressionContext createExpressionContext() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QString readEntry(const QString &scope, const QString &key, const QString &def=QString(), bool *ok=nullptr) const
Reads a string from the specified scope and key.
bool readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const
Reads a boolean from the specified scope and key.
QgsCoordinateReferenceSystem crs
Definition qgsproject.h:112
double readDoubleEntry(const QString &scope, const QString &key, double def=0, bool *ok=nullptr) const
Reads a double from the specified scope and key.
QStringList readListEntry(const QString &scope, const QString &key, const QStringList &def=QStringList(), bool *ok=nullptr) const
Reads a string list from the specified scope and key.
QgsProperty property(int key) const final
Returns a matching property from the collection, if one exists.
A store for object properties.
QString expressionString() const
Returns the expression used for the property value.
QString valueAsString(const QgsExpressionContext &context, const QString &defaultString=QString(), bool *ok=nullptr) const
Calculates the current value of the property and interprets it as a string.
bool isActive() const
Returns whether the property is currently active.
A rectangle specified with double values.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
virtual QString header(const QString &name) const
Returns the header value.
QUrl baseUrl() const
Returns the base URL of QGIS server.
QUrl originalUrl() const
Returns the request url as seen by the web server, by default this is equal to the url seen by QGIS s...
RequestHeader
The internal HTTP Header used for the request as enum.
@ X_QGIS_WMS_SERVICE_URL
The QGIS WMS service URL.
@ X_QGIS_WCS_SERVICE_URL
The QGIS WCS service URL.
@ X_QGIS_WFS_SERVICE_URL
The QGIS WFS service URL.
@ X_FORWARDED_PROTO
Https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto.
@ X_QGIS_WMTS_SERVICE_URL
The QGIS WMTS service URL.
@ X_QGIS_SERVICE_URL
The QGIS service URL.
@ X_FORWARDED_HOST
Https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host.
@ FORWARDED
Https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded, https://tools....
@ HOST
Https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host.
Provides a way to retrieve settings by prioritizing according to environment variables,...
QString serviceUrl(const QString &service) const
Returns the service URL from the setting.
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 bool wmsSkipNameForGroup(const QgsProject &project)
Returns if name attribute should be skipped for groups in WMS capabilities document.
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 bool wmsAddLegendGroupsLegendGraphic(const QgsProject &project)
Returns if legend groups should be in the legend graphic response if GetLegendGraphic is called on a ...
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.
const QgsCoordinateReferenceSystem & crs