41#ifdef HAVE_SERVER_PYTHON_PLUGINS
45 const QDomDocument *capabilitiesDocument =
nullptr;
47#ifdef HAVE_SERVER_PYTHON_PLUGINS
49 if ( cacheManager && cacheManager->
getCachedDocument( &doc, project, request, accessControl ) )
51 capabilitiesDocument = &doc;
61 capabilitiesDocument = &doc;
65 capabilitiesDocument = &doc;
67 response.
setHeader( QStringLiteral(
"Content-Type" ), QStringLiteral(
"text/xml; charset=utf-8" ) );
68 response.
write( capabilitiesDocument->toByteArray() );
79 QDomElement wfsCapabilitiesElement = doc.createElement( QStringLiteral(
"WFS_Capabilities" ) );
80 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns" ),
WFS_NAMESPACE );
81 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:xsi" ), QStringLiteral(
"http://www.w3.org/2001/XMLSchema-instance" ) );
82 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xsi:schemaLocation" ),
WFS_NAMESPACE +
" http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" );
83 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:ogc" ),
OGC_NAMESPACE );
84 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:gml" ),
GML_NAMESPACE );
85 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:ows" ), QStringLiteral(
"http://www.opengis.net/ows" ) );
86 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:xlink" ), QStringLiteral(
"http://www.w3.org/1999/xlink" ) );
88 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"updateSequence" ), QStringLiteral(
"0" ) );
89 doc.appendChild( wfsCapabilitiesElement );
107 QDomElement filterCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Filter_Capabilities" ) );
108 wfsCapabilitiesElement.appendChild( filterCapabilitiesElement );
109 QDomElement spatialCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Spatial_Capabilities" ) );
110 filterCapabilitiesElement.appendChild( spatialCapabilitiesElement );
112 QStringList geometryOperands;
113 geometryOperands << QStringLiteral(
"gml:Point" ) << QStringLiteral(
"gml:LineString" ) << QStringLiteral(
"gml:Polygon" )
114 << QStringLiteral(
"gml:Envelope" );
115 QDomElement geometryOperandsElem = doc.createElement( QStringLiteral(
"ogc:GeometryOperands" ) );
116 for (
const QString &geometryOperand : geometryOperands )
118 QDomElement geometryOperandElem = doc.createElement( QStringLiteral(
"ogc:GeometryOperand" ) );
119 const QDomText geometryOperandText = doc.createTextNode( geometryOperand );
120 geometryOperandElem.appendChild( geometryOperandText );
121 geometryOperandsElem.appendChild( geometryOperandElem );
123 spatialCapabilitiesElement.appendChild( geometryOperandsElem );
125 QStringList spatialOperators;
126 spatialOperators << QStringLiteral(
"Equals" ) << QStringLiteral(
"Disjoint" ) << QStringLiteral(
"Touches" )
127 << QStringLiteral(
"Within" ) << QStringLiteral(
"Overlaps" ) << QStringLiteral(
"Crosses" )
128 << QStringLiteral(
"Intersects" ) << QStringLiteral(
"Contains" ) << QStringLiteral(
"BBOX" );
129 QDomElement spatialOperatorsElem = doc.createElement( QStringLiteral(
"ogc:SpatialOperators" ) );
130 for (
const QString &spatialOperator : spatialOperators )
132 QDomElement spatialOperatorElem = doc.createElement( QStringLiteral(
"ogc:SpatialOperator" ) );
133 spatialOperatorElem.setAttribute( QStringLiteral(
"name" ), spatialOperator );
134 spatialOperatorsElem.appendChild( spatialOperatorElem );
136 spatialCapabilitiesElement.appendChild( spatialOperatorsElem );
137 QDomElement scalarCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Scalar_Capabilities" ) );
138 filterCapabilitiesElement.appendChild( scalarCapabilitiesElement );
139 const QDomElement logicalOperatorsElement = doc.createElement( QStringLiteral(
"ogc:LogicalOperators" ) );
140 scalarCapabilitiesElement.appendChild( logicalOperatorsElement );
142 QStringList comparisonOperators;
143 comparisonOperators << QStringLiteral(
"LessThan" ) << QStringLiteral(
"GreaterThan" )
144 << QStringLiteral(
"LessThanEqualTo" ) << QStringLiteral(
"GreaterThanEqualTo" )
145 << QStringLiteral(
"EqualTo" ) << QStringLiteral(
"Like" ) << QStringLiteral(
"Between" );
146 QDomElement comparisonOperatorsElem = doc.createElement( QStringLiteral(
"ogc:ComparisonOperators" ) );
147 for (
const QString &comparisonOperator : comparisonOperators )
149 QDomElement comparisonOperatorElem = doc.createElement( QStringLiteral(
"ogc:ComparisonOperator" ) );
150 const QDomText comparisonOperatorText = doc.createTextNode( comparisonOperator );
151 comparisonOperatorElem.appendChild( comparisonOperatorText );
152 comparisonOperatorsElem.appendChild( comparisonOperatorElem );
154 scalarCapabilitiesElement.appendChild( comparisonOperatorsElem );
156 QDomElement idCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Id_Capabilities" ) );
157 const QDomElement fidElem = doc.createElement( QStringLiteral(
"ogc:FID" ) );
158 idCapabilitiesElement.appendChild( fidElem );
159 filterCapabilitiesElement.appendChild( idCapabilitiesElement );
167 QDomElement serviceElem = doc.createElement( QStringLiteral(
"ows:ServiceIdentification" ) );
170 QDomElement titleElem = doc.createElement( QStringLiteral(
"ows:Title" ) );
171 const QDomText titleText = doc.createTextNode( title );
172 titleElem.appendChild( titleText );
173 serviceElem.appendChild( titleElem );
176 if ( !abstract.isEmpty() )
178 QDomElement abstractElem = doc.createElement( QStringLiteral(
"ows:Abstract" ) );
179 const QDomText abstractText = doc.createCDATASection( abstract );
180 abstractElem.appendChild( abstractText );
181 serviceElem.appendChild( abstractElem );
185 if ( !keywords.isEmpty() && !keywords.join( QLatin1String(
", " ) ).isEmpty() )
187 QDomElement keywordsElem = doc.createElement( QStringLiteral(
"ows:Keywords" ) );
188 for (
const QString &keyword : keywords )
190 if ( !keyword.isEmpty() )
192 QDomElement keywordElem = doc.createElement( QStringLiteral(
"ows:Keyword" ) );
193 const QDomText keywordText = doc.createTextNode( keyword );
194 keywordElem.appendChild( keywordText );
195 keywordsElem.appendChild( keywordElem );
198 serviceElem.appendChild( keywordsElem );
202 QDomElement serviceTypeElem = doc.createElement( QStringLiteral(
"ows:ServiceType" ) );
203 const QDomText serviceTypeText = doc.createTextNode(
"WFS" );
204 serviceTypeElem.appendChild( serviceTypeText );
205 serviceElem.appendChild( serviceTypeElem );
208 QDomElement serviceTypeVersionElem = doc.createElement( QStringLiteral(
"ows:ServiceTypeVersion" ) );
209 const QDomText serviceTypeVersionText = doc.createTextNode(
"1.1.0" );
210 serviceTypeVersionElem.appendChild( serviceTypeVersionText );
211 serviceElem.appendChild( serviceTypeVersionElem );
213 QDomElement feesElem = doc.createElement( QStringLiteral(
"ows:Fees" ) );
214 QDomText feesText = doc.createTextNode(
"None" );
216 if ( !fees.isEmpty() )
218 feesText = doc.createTextNode( fees );
220 feesElem.appendChild( feesText );
221 serviceElem.appendChild( feesElem );
223 QDomElement accessConstraintsElem = doc.createElement( QStringLiteral(
"ows:AccessConstraints" ) );
225 QDomText accessConstraintsText = doc.createTextNode(
"None" );
226 if ( !accessConstraints.isEmpty() )
228 accessConstraintsText = doc.createTextNode( accessConstraints );
230 accessConstraintsElem.appendChild( accessConstraintsText );
231 serviceElem.appendChild( accessConstraintsElem );
239 QDomElement serviceElem = doc.createElement( QStringLiteral(
"ows:ServiceProvider" ) );
243 if ( !contactOrganization.isEmpty() )
245 QDomElement providerNameElem = doc.createElement( QStringLiteral(
"ows:ProviderName" ) );
246 const QDomText providerNameText = doc.createTextNode( contactOrganization );
247 providerNameElem.appendChild( providerNameText );
248 serviceElem.appendChild( providerNameElem );
253 if ( !contactPerson.isEmpty() || !contactPosition.isEmpty() )
256 QDomElement serviceContactElem = doc.createElement( QStringLiteral(
"ows:ServiceContact" ) );
258 if ( !contactPerson.isEmpty() )
260 QDomElement individualNameElem = doc.createElement( QStringLiteral(
"ows:IndividualName" ) );
261 const QDomText individualNameText = doc.createTextNode( contactPerson );
262 individualNameElem.appendChild( individualNameText );
263 serviceContactElem.appendChild( individualNameElem );
266 if ( !contactPosition.isEmpty() )
268 QDomElement positionNameElem = doc.createElement( QStringLiteral(
"ows:PositionName" ) );
269 const QDomText positionNameText = doc.createTextNode( contactPosition );
270 positionNameElem.appendChild( positionNameText );
271 serviceContactElem.appendChild( positionNameElem );
277 if ( !contactMail.isEmpty() || !contactPhone.isEmpty() || !onlineResource.isEmpty() )
280 QDomElement contactInfoElem = doc.createElement( QStringLiteral(
"ows:ContactInfo" ) );
282 if ( !contactPhone.isEmpty() )
284 QDomElement phoneElem = doc.createElement( QStringLiteral(
"ows:Phone" ) );
285 QDomElement voiceElem = doc.createElement( QStringLiteral(
"ows:Voice" ) );
286 const QDomText voiceText = doc.createTextNode( contactPhone );
287 voiceElem.appendChild( voiceText );
288 phoneElem.appendChild( voiceElem );
289 contactInfoElem.appendChild( phoneElem );
292 if ( !contactMail.isEmpty() )
294 QDomElement addressElem = doc.createElement( QStringLiteral(
"ows:Address" ) );
295 QDomElement mailElem = doc.createElement( QStringLiteral(
"ows:ElectronicMailAddress" ) );
296 const QDomText mailText = doc.createTextNode( contactMail );
297 mailElem.appendChild( mailText );
298 addressElem.appendChild( mailElem );
299 contactInfoElem.appendChild( addressElem );
302 if ( !onlineResource.isEmpty() )
304 QDomElement onlineResourceElem = doc.createElement( QStringLiteral(
"ows:OnlineResource" ) );
305 onlineResourceElem.setAttribute(
"xlink:href", onlineResource );
306 contactInfoElem.appendChild( onlineResourceElem );
310 QDomElement roleElem = doc.createElement( QStringLiteral(
"ows:Role" ) );
311 const QDomText roleText = doc.createTextNode(
"PointOfContact" );
312 roleElem.appendChild( roleText );
313 serviceContactElem.appendChild( roleElem );
315 serviceElem.appendChild( serviceContactElem );
323 QDomElement parameterElement = doc.createElement( QStringLiteral(
"ows:Parameter" ) );
324 parameterElement.setAttribute( QStringLiteral(
"name" ), name );
326 for (
const QString &v : values )
328 QDomElement valueElement = doc.createElement( QStringLiteral(
"ows:Value" ) );
329 const QDomText valueText = doc.createTextNode( v );
330 valueElement.appendChild( valueText );
331 parameterElement.appendChild( valueElement );
334 return parameterElement;
339 QDomElement oprationsElement = doc.createElement( QStringLiteral(
"ows:OperationsMetadata" ) );
342 const QString hrefString =
serviceUrl( request, project, *settings );
344 QDomElement operationElement = doc.createElement( QStringLiteral(
"ows:Operation" ) );
345 QDomElement dcpElement = doc.createElement( QStringLiteral(
"ows:DCP" ) );
346 QDomElement httpElement = doc.createElement( QStringLiteral(
"ows:HTTP" ) );
347 QDomElement getElement = doc.createElement( QStringLiteral(
"ows:Get" ) );
348 getElement.setAttribute( QStringLiteral(
"xlink:href" ), hrefString );
349 httpElement.appendChild( getElement );
351 QDomElement postElement = doc.createElement( QStringLiteral(
"ows:Post" ) );
352 postElement.setAttribute( QStringLiteral(
"xlink:href" ), hrefString );
353 httpElement.appendChild( postElement );
355 dcpElement.appendChild( httpElement );
356 operationElement.appendChild( dcpElement );
359 QDomElement getCapabilitiesElement = operationElement.cloneNode().toElement();
360 getCapabilitiesElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"GetCapabilities" ) );
362 const QDomElement serviceParameterElement =
getParameterElement( doc, QStringLiteral(
"service" ), QStringList() << QStringLiteral(
"WFS" ) );
363 getCapabilitiesElement.appendChild( serviceParameterElement );
365 const QDomElement acceptVersionsParameterElement =
getParameterElement( doc, QStringLiteral(
"AcceptVersions" ), QStringList() << QStringLiteral(
"1.1.0" ) << QStringLiteral(
"1.0.0" ) );
366 getCapabilitiesElement.appendChild( acceptVersionsParameterElement );
368 const QDomElement acceptFormatsParameterElement =
getParameterElement( doc, QStringLiteral(
"AcceptFormats" ), QStringList() << QStringLiteral(
"text/xml" ) );
369 getCapabilitiesElement.appendChild( acceptFormatsParameterElement );
371 oprationsElement.appendChild( getCapabilitiesElement );
374 QDomElement describeFeatureTypeElement = operationElement.cloneNode().toElement();
375 describeFeatureTypeElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"DescribeFeatureType" ) );
377 const QDomElement dftOutputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"outputFormat" ), QStringList() << QStringLiteral(
"XMLSCHEMA" ) << QStringLiteral(
"text/xml; subtype=gml/2.1.2" ) << QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) );
378 describeFeatureTypeElement.appendChild( dftOutputFormatParameterElement );
380 oprationsElement.appendChild( describeFeatureTypeElement );
383 QDomElement getFeatureElement = operationElement.cloneNode().toElement();
384 getFeatureElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"GetFeature" ) );
386 const QDomElement gfOutputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"outputFormat" ), QStringList() << QStringLiteral(
"text/xml; subtype=gml/2.1.2" ) << QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) << QStringLiteral(
"application/vnd.geo+json" ) );
387 getFeatureElement.appendChild( gfOutputFormatParameterElement );
389 const QDomElement resultTypeParameterElement =
getParameterElement( doc, QStringLiteral(
"resultType" ), QStringList() << QStringLiteral(
"results" ) << QStringLiteral(
"hits" ) );
390 getFeatureElement.appendChild( resultTypeParameterElement );
392 oprationsElement.appendChild( getFeatureElement );
395 QDomElement transactionElement = operationElement.cloneNode().toElement();
396 transactionElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"Transaction" ) );
398 const QDomElement inputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"inputFormat" ), QStringList() << QStringLiteral(
"text/xml; subtype=gml/2.1.2" ) << QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) << QStringLiteral(
"application/vnd.geo+json" ) );
399 transactionElement.appendChild( inputFormatParameterElement );
401 oprationsElement.appendChild( transactionElement );
403 return oprationsElement;
408#ifdef HAVE_SERVER_PYTHON_PLUGINS
411 ( void ) serverIface;
415 QDomElement featureTypeListElement = doc.createElement( QStringLiteral(
"FeatureTypeList" ) );
417 QDomElement operationsElement = doc.createElement( QStringLiteral(
"Operations" ) );
418 featureTypeListElement.appendChild( operationsElement );
420 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
421 const QDomText queryText = doc.createTextNode(
"Query" );
422 operationElement.appendChild( queryText );
423 operationsElement.appendChild( operationElement );
429 for (
const QString &wfsLayerId : wfsLayerIds )
440#ifdef HAVE_SERVER_PYTHON_PLUGINS
446 QDomElement layerElem = doc.createElement( QStringLiteral(
"FeatureType" ) );
449 QDomElement nameElem = doc.createElement( QStringLiteral(
"Name" ) );
450 const QDomText nameText = doc.createTextNode(
layerTypeName( layer ) );
451 nameElem.appendChild( nameText );
452 layerElem.appendChild( nameElem );
455 QDomElement titleElem = doc.createElement( QStringLiteral(
"Title" ) );
457 if ( title.isEmpty() )
459 title = layer->
name();
461 const QDomText titleText = doc.createTextNode( title );
462 titleElem.appendChild( titleText );
463 layerElem.appendChild( titleElem );
467 if ( !abstract.isEmpty() )
469 QDomElement abstractElem = doc.createElement( QStringLiteral(
"Abstract" ) );
470 const QDomText abstractText = doc.createTextNode( abstract );
471 abstractElem.appendChild( abstractText );
472 layerElem.appendChild( abstractElem );
477 if ( !keywords.isEmpty() )
479 QDomElement keywordsElem = doc.createElement( QStringLiteral(
"ows:Keywords" ) );
480 for (
const QString &keyword : keywords.split(
',' ) )
482 if ( !keyword.trimmed().isEmpty() )
484 QDomElement keywordElem = doc.createElement( QStringLiteral(
"ows:Keyword" ) );
485 const QDomText keywordText = doc.createTextNode( keyword.trimmed() );
486 keywordElem.appendChild( keywordText );
487 keywordsElem.appendChild( keywordElem );
490 layerElem.appendChild( keywordsElem );
494 const QString defaultSrs = layer->
crs().
authid();
495 QDomElement srsElem = doc.createElement( QStringLiteral(
"DefaultSRS" ) );
496 const QDomText srsText = doc.createTextNode( defaultSrs );
497 srsElem.appendChild( srsText );
498 layerElem.appendChild( srsElem );
502 for (
const QString &
crs : outputCrsList )
504 if (
crs == defaultSrs )
506 QDomElement otherSrsElem = doc.createElement( QStringLiteral(
"OtherSRS" ) );
507 const QDomText otherSrsText = doc.createTextNode(
crs );
508 otherSrsElem.appendChild( otherSrsText );
509 layerElem.appendChild( otherSrsElem );
513 QDomElement operationsElement = doc.createElement( QStringLiteral(
"Operations" ) );
515 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
516 const QDomText queryText = doc.createTextNode( QStringLiteral(
"Query" ) );
517 operationElement.appendChild( queryText );
518 operationsElement.appendChild( operationElement );
520 if ( wfstUpdateLayersId.contains( layer->
id() ) || wfstInsertLayersId.contains( layer->
id() ) || wfstDeleteLayersId.contains( layer->
id() ) )
527 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
528 const QDomText insertText = doc.createTextNode( QStringLiteral(
"Insert" ) );
529 operationElement.appendChild( insertText );
530 operationsElement.appendChild( operationElement );
536 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
537 const QDomText updateText = doc.createTextNode( QStringLiteral(
"Update" ) );
538 operationElement.appendChild( updateText );
539 operationsElement.appendChild( operationElement );
545 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
546 const QDomText deleteText = doc.createTextNode( QStringLiteral(
"Delete" ) );
547 operationElement.appendChild( deleteText );
548 operationsElement.appendChild( operationElement );
552 layerElem.appendChild( operationsElement );
558 const int wgs84precision = 6;
560 if ( !layerExtent.
isNull() )
574 QDomElement bBoxElement = doc.createElement( QStringLiteral(
"ows:WGS84BoundingBox" ) );
575 bBoxElement.setAttribute( QStringLiteral(
"dimensions" ), QStringLiteral(
"2" ) );
576 QDomElement lCornerElement = doc.createElement( QStringLiteral(
"ows:LowerCorner" ) );
578 lCornerElement.appendChild( lCornerText );
579 bBoxElement.appendChild( lCornerElement );
580 QDomElement uCornerElement = doc.createElement( QStringLiteral(
"ows:UpperCorner" ) );
582 uCornerElement.appendChild( uCornerText );
583 bBoxElement.appendChild( uCornerElement );
584 layerElem.appendChild( bBoxElement );
590 QDomElement metaUrlElem = doc.createElement( QStringLiteral(
"MetadataURL" ) );
591 const QString metadataUrlType = url.type;
592 metaUrlElem.setAttribute( QStringLiteral(
"type" ), metadataUrlType );
593 const QString metadataUrlFormat = url.format;
594 metaUrlElem.setAttribute( QStringLiteral(
"format" ), metadataUrlFormat );
595 const QDomText metaUrlText = doc.createTextNode( url.url );
596 metaUrlElem.appendChild( metaUrlText );
597 layerElem.appendChild( metaUrlElem );
600 featureTypeListElement.appendChild( layerElem );
603 return featureTypeListElement;
@ AddFeatures
Allows adding features.
@ ChangeGeometries
Allows modifications of geometries.
@ DeleteFeatures
Allows deletion of features.
@ ChangeAttributeValues
Allows modification of attribute values.
A helper class that centralizes restrictions given by all the access control filter plugins.
bool layerReadPermission(const QgsMapLayer *layer) const
Returns the layer read right.
This class represents a coordinate reference system (CRS).
static QgsCoordinateReferenceSystem fromOgcWmsCrs(const QString &ogcCrs)
Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
Custom exception class for Coordinate Reference System related exceptions.
QString keywordList() const
Returns the keyword list of the layerused by QGIS Server in GetCapabilities request.
QString wfsTitle() const
Returns the optional WFS title if set or the title of the layer used by QGIS WFS in GetCapabilities r...
QString abstract() const
Returns the abstract of the layerused by QGIS Server in GetCapabilities request.
Base class for all map layer types.
virtual QgsRectangle extent() const
Returns the extent of the layer.
QgsCoordinateReferenceSystem crs
QgsMapLayerServerProperties * serverProperties()
Returns QGIS Server Properties for the map layer.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Q_INVOKABLE QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
A rectangle specified with double values.
A helper class that centralizes caches accesses given by all the server cache filter plugins.
bool setCachedDocument(const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const
Updates or inserts the document in cache like capabilities.
bool getCachedDocument(QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const
Returns cached document (or 0 if document not in cache) like capabilities.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
virtual QgsServerCacheManager * cacheManager() const =0
Gets the registered server cache filters.
virtual QgsAccessControl * accessControls() const =0
Gets the registered access control filters.
virtual QgsServerSettings * serverSettings()=0
Returns the server settings.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
virtual void write(const QString &data)
Write string This is a convenient method that will write directly to the underlying I/O device.
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
Provides a way to retrieve settings by prioritizing according to environment variables,...
This is the base class for vector data providers.
virtual Q_INVOKABLE Qgis::VectorProviderCapabilities capabilities() const
Returns flags containing the supported capabilities.
Represents a vector layer which manages a vector based data sets.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
SERVER_EXPORT double ceilWithPrecision(double number, int places)
Returns a double greater than number to the specified number of places.
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 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 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 wmsOutputCrsList(const QgsProject &project)
Returns the WMS output CRS list.
SERVER_EXPORT QString owsServiceContactOrganization(const QgsProject &project)
Returns the owsService contact organization defined in 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 owsServiceContactPhone(const QgsProject &project)
Returns the owsService contact phone defined in project.
SERVER_EXPORT QString owsServiceContactPerson(const QgsProject &project)
Returns the owsService contact person defined in project.
QString layerTypeName(const QgsMapLayer *layer)
Returns typename from vector layer.
QString implementationVersion()
Returns the highest version supported by this implementation.
QDomElement getParameterElement(QDomDocument &doc, const QString &name, const QStringList &values)
Create a parameter element.
QString serviceUrl(const QgsServerRequest &request, const QgsProject *project, const QgsServerSettings &settings)
Service URL string.
const QString OGC_NAMESPACE
QDomElement getOperationsMetadataElement(QDomDocument &doc, const QgsProject *project, const QgsServerRequest &request, const QgsServerSettings *settings)
Create OperationsMetadata element for get capabilities document.
const QString GML_NAMESPACE
const QString WFS_NAMESPACE
QDomElement getFeatureTypeListElement(QDomDocument &doc, QgsServerInterface *serverIface, const QgsProject *project)
Create FeatureTypeList element for get capabilities document.
void writeGetCapabilities(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output WFS GetCapabilities response.
QDomDocument createGetCapabilitiesDocument(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request)
Create get capabilities document.
QDomElement getServiceIdentificationElement(QDomDocument &doc, const QgsProject *project)
Create Service Identification element for get capabilities document.
QDomElement getServiceProviderElement(QDomDocument &doc, const QgsProject *project)
Create Service Provider element for get capabilities document.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
CONSTLATIN1STRING geoEpsgCrsAuthId()
Geographic coord sys from EPSG authority.
const QgsCoordinateReferenceSystem & crs