42 #ifdef HAVE_SERVER_PYTHON_PLUGINS 46 const QDomDocument *capabilitiesDocument =
nullptr;
49 #ifdef HAVE_SERVER_PYTHON_PLUGINS 52 if ( cacheManager && cacheManager->
getCachedDocument( &doc, project, request, accessControl ) )
54 capabilitiesDocument = &doc;
64 capabilitiesDocument = &doc;
67 response.
setHeader( QStringLiteral(
"Content-Type" ), QStringLiteral(
"text/xml; charset=utf-8" ) );
68 response.
write( capabilitiesDocument->toByteArray() );
80 QDomElement wfsCapabilitiesElement = doc.createElement( QStringLiteral(
"WFS_Capabilities" ) );
81 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns" ),
WFS_NAMESPACE );
82 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:xsi" ), QStringLiteral(
"http://www.w3.org/2001/XMLSchema-instance" ) );
83 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xsi:schemaLocation" ),
WFS_NAMESPACE +
" http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd" );
84 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:ogc" ),
OGC_NAMESPACE );
85 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:gml" ),
GML_NAMESPACE );
86 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:ows" ), QStringLiteral(
"http://www.opengis.net/ows" ) );
87 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:xlink" ), QStringLiteral(
"http://www.w3.org/1999/xlink" ) );
89 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"updateSequence" ), QStringLiteral(
"0" ) );
90 doc.appendChild( wfsCapabilitiesElement );
108 QDomElement filterCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Filter_Capabilities" ) );
109 wfsCapabilitiesElement.appendChild( filterCapabilitiesElement );
110 QDomElement spatialCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Spatial_Capabilities" ) );
111 filterCapabilitiesElement.appendChild( spatialCapabilitiesElement );
113 QStringList geometryOperands;
114 geometryOperands << QStringLiteral(
"gml:Point" ) << QStringLiteral(
"gml:LineString" ) << QStringLiteral(
"gml:Polygon" )
115 << QStringLiteral(
"gml:Envelope" );
116 QDomElement geometryOperandsElem = doc.createElement( QStringLiteral(
"ogc:GeometryOperands" ) );
117 for (
const QString &geometryOperand : geometryOperands )
119 QDomElement geometryOperandElem = doc.createElement( QStringLiteral(
"ogc:GeometryOperand" ) );
120 QDomText geometryOperandText = doc.createTextNode( geometryOperand );
121 geometryOperandElem.appendChild( geometryOperandText );
122 geometryOperandsElem.appendChild( geometryOperandElem );
124 spatialCapabilitiesElement.appendChild( geometryOperandsElem );
126 QStringList spatialOperators;
127 spatialOperators << QStringLiteral(
"Equals" ) << QStringLiteral(
"Disjoint" ) << QStringLiteral(
"Touches" )
128 << QStringLiteral(
"Within" ) << QStringLiteral(
"Overlaps" ) << QStringLiteral(
"Crosses" )
129 << QStringLiteral(
"Intersects" ) << QStringLiteral(
"Contains" ) << QStringLiteral(
"DWithin" )
130 << QStringLiteral(
"Beyond" ) << QStringLiteral(
"BBOX" );
131 QDomElement spatialOperatorsElem = doc.createElement( QStringLiteral(
"ogc:SpatialOperators" ) );
132 for (
const QString &spatialOperator : spatialOperators )
134 QDomElement spatialOperatorElem = doc.createElement( QStringLiteral(
"ogc:SpatialOperator" ) );
135 spatialOperatorElem.setAttribute( QStringLiteral(
"name" ), spatialOperator );
136 spatialOperatorsElem.appendChild( spatialOperatorElem );
138 spatialCapabilitiesElement.appendChild( spatialOperatorsElem );
139 QDomElement scalarCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Scalar_Capabilities" ) );
140 filterCapabilitiesElement.appendChild( scalarCapabilitiesElement );
141 QDomElement logicalOperatorsElement = doc.createElement( QStringLiteral(
"ogc:LogicalOperators" ) );
142 scalarCapabilitiesElement.appendChild( logicalOperatorsElement );
144 QStringList comparisonOperators;
145 comparisonOperators << QStringLiteral(
"LessThan" ) << QStringLiteral(
"GreaterThan" )
146 << QStringLiteral(
"LessThanEqualTo" ) << QStringLiteral(
"GreaterThanEqualTo" )
147 << QStringLiteral(
"EqualTo" ) << QStringLiteral(
"Like" ) << QStringLiteral(
"Between" );
148 QDomElement comparisonOperatorsElem = doc.createElement( QStringLiteral(
"ogc:ComparisonOperators" ) );
149 for (
const QString &comparisonOperator : comparisonOperators )
151 QDomElement comparisonOperatorElem = doc.createElement( QStringLiteral(
"ogc:ComparisonOperator" ) );
152 QDomText comparisonOperatorText = doc.createTextNode( comparisonOperator );
153 comparisonOperatorElem.appendChild( comparisonOperatorText );
154 comparisonOperatorsElem.appendChild( comparisonOperatorElem );
156 scalarCapabilitiesElement.appendChild( comparisonOperatorsElem );
158 QDomElement idCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Id_Capabilities" ) );
159 QDomElement fidElem = doc.createElement( QStringLiteral(
"ogc:FID" ) );
160 idCapabilitiesElement.appendChild( fidElem );
161 filterCapabilitiesElement.appendChild( idCapabilitiesElement );
170 QDomElement serviceElem = doc.createElement( QStringLiteral(
"ows:ServiceIdentification" ) );
173 if ( !title.isEmpty() )
175 QDomElement titleElem = doc.createElement( QStringLiteral(
"ows:Title" ) );
176 QDomText titleText = doc.createTextNode( title );
177 titleElem.appendChild( titleText );
178 serviceElem.appendChild( titleElem );
182 if ( !
abstract.isEmpty() )
184 QDomElement abstractElem = doc.createElement( QStringLiteral(
"ows:Abstract" ) );
185 QDomText abstractText = doc.createCDATASection(
abstract );
186 abstractElem.appendChild( abstractText );
187 serviceElem.appendChild( abstractElem );
191 if ( !keywords.isEmpty() && !keywords.join( QStringLiteral(
", " ) ).isEmpty() )
193 QDomElement keywordsElem = doc.createElement( QStringLiteral(
"ows:Keywords" ) );
194 for (
const QString &keyword : keywords )
196 if ( !keyword.isEmpty() )
198 QDomElement keywordElem = doc.createElement( QStringLiteral(
"ows:Keyword" ) );
199 QDomText keywordText = doc.createTextNode( keyword );
200 keywordElem.appendChild( keywordText );
201 keywordsElem.appendChild( keywordElem );
204 serviceElem.appendChild( keywordsElem );
208 QDomElement serviceTypeElem = doc.createElement( QStringLiteral(
"ows:ServiceType" ) );
209 QDomText serviceTypeText = doc.createTextNode(
"WFS" );
210 serviceTypeElem.appendChild( serviceTypeText );
211 serviceElem.appendChild( serviceTypeElem );
214 QDomElement serviceTypeVersionElem = doc.createElement( QStringLiteral(
"ows:ServiceTypeVersion" ) );
215 QDomText serviceTypeVersionText = doc.createTextNode(
"1.1.0" );
216 serviceTypeVersionElem.appendChild( serviceTypeVersionText );
217 serviceElem.appendChild( serviceTypeVersionElem );
219 QDomElement feesElem = doc.createElement( QStringLiteral(
"ows:Fees" ) );
220 QDomText feesText = doc.createTextNode(
"None" );
222 if ( !fees.isEmpty() )
224 feesText = doc.createTextNode( fees );
226 feesElem.appendChild( feesText );
227 serviceElem.appendChild( feesElem );
229 QDomElement accessConstraintsElem = doc.createElement( QStringLiteral(
"ows:AccessConstraints" ) );
231 QDomText accessConstraintsText = doc.createTextNode(
"None" );
232 if ( !accessConstraints.isEmpty() )
234 accessConstraintsText = doc.createTextNode( accessConstraints );
236 accessConstraintsElem.appendChild( accessConstraintsText );
237 serviceElem.appendChild( accessConstraintsElem );
246 QDomElement serviceElem = doc.createElement( QStringLiteral(
"ows:ServiceProvider" ) );
250 if ( !contactOrganization.isEmpty() )
252 QDomElement providerNameElem = doc.createElement( QStringLiteral(
"ows:ProviderName" ) );
253 QDomText providerNameText = doc.createTextNode( contactOrganization );
254 providerNameElem.appendChild( providerNameText );
255 serviceElem.appendChild( providerNameElem );
260 if ( !contactPerson.isEmpty() ||
261 !contactPosition.isEmpty() )
264 QDomElement serviceContactElem = doc.createElement( QStringLiteral(
"ows:ServiceContact" ) );
266 if ( !contactPerson.isEmpty() )
268 QDomElement individualNameElem = doc.createElement( QStringLiteral(
"ows:IndividualName" ) );
269 QDomText individualNameText = doc.createTextNode( contactPerson );
270 individualNameElem.appendChild( individualNameText );
271 serviceContactElem.appendChild( individualNameElem );
274 if ( !contactPosition.isEmpty() )
276 QDomElement positionNameElem = doc.createElement( QStringLiteral(
"ows:PositionName" ) );
277 QDomText positionNameText = doc.createTextNode( contactPosition );
278 positionNameElem.appendChild( positionNameText );
279 serviceContactElem.appendChild( positionNameElem );
285 if ( !contactMail.isEmpty() ||
286 !contactPhone.isEmpty() ||
287 !onlineResource.isEmpty() )
290 QDomElement contactInfoElem = doc.createElement( QStringLiteral(
"ows:ContactInfo" ) );
292 if ( !contactPhone.isEmpty() )
294 QDomElement phoneElem = doc.createElement( QStringLiteral(
"ows:Phone" ) );
295 QDomElement voiceElem = doc.createElement( QStringLiteral(
"ows:Voice" ) );
296 QDomText voiceText = doc.createTextNode( contactPhone );
297 voiceElem.appendChild( voiceText );
298 phoneElem.appendChild( voiceElem );
299 contactInfoElem.appendChild( phoneElem );
302 if ( !contactMail.isEmpty() )
304 QDomElement addressElem = doc.createElement( QStringLiteral(
"ows:Address" ) );
305 QDomElement mailElem = doc.createElement( QStringLiteral(
"ows:ElectronicMailAddress" ) );
306 QDomText mailText = doc.createTextNode( contactMail );
307 mailElem.appendChild( mailText );
308 addressElem.appendChild( mailElem );
309 contactInfoElem.appendChild( addressElem );
312 if ( !onlineResource.isEmpty() )
314 QDomElement onlineResourceElem = doc.createElement( QStringLiteral(
"ows:OnlineResource" ) );
315 onlineResourceElem.setAttribute(
"xlink:href", onlineResource );
316 contactInfoElem.appendChild( onlineResourceElem );
320 QDomElement roleElem = doc.createElement( QStringLiteral(
"ows:Role" ) );
321 QDomText roleText = doc.createTextNode(
"PointOfContact" );
322 roleElem.appendChild( roleText );
323 serviceContactElem.appendChild( roleElem );
325 serviceElem.appendChild( serviceContactElem );
334 QDomElement parameterElement = doc.createElement( QStringLiteral(
"ows:Parameter" ) );
335 parameterElement.setAttribute( QStringLiteral(
"name" ), name );
337 for (
const QString &v : values )
339 QDomElement valueElement = doc.createElement( QStringLiteral(
"ows:Value" ) );
340 QDomText valueText = doc.createTextNode( v );
341 valueElement.appendChild( valueText );
342 parameterElement.appendChild( valueElement );
345 return parameterElement;
350 QDomElement oprationsElement = doc.createElement( QStringLiteral(
"ows:OperationsMetadata" ) );
353 QString hrefString =
serviceUrl( request, project );
355 QDomElement operationElement = doc.createElement( QStringLiteral(
"ows:Operation" ) );
356 QDomElement dcpElement = doc.createElement( QStringLiteral(
"ows:DCP" ) );
357 QDomElement httpElement = doc.createElement( QStringLiteral(
"ows:HTTP" ) );
358 QDomElement getElement = doc.createElement( QStringLiteral(
"ows:Get" ) );
359 getElement.setAttribute( QStringLiteral(
"xlink:href" ), hrefString );
360 httpElement.appendChild( getElement );
362 QDomElement postElement = doc.createElement( QStringLiteral(
"ows:Post" ) );
363 postElement.setAttribute( QStringLiteral(
"xlink:href" ), hrefString );
364 httpElement.appendChild( postElement );
366 dcpElement.appendChild( httpElement );
367 operationElement.appendChild( dcpElement );
370 QDomElement getCapabilitiesElement = operationElement.cloneNode().toElement();
371 getCapabilitiesElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"GetCapabilities" ) );
373 QDomElement serviceParameterElement =
getParameterElement( doc, QStringLiteral(
"service" ),
374 QStringList() << QStringLiteral(
"WFS" ) );
375 getCapabilitiesElement.appendChild( serviceParameterElement );
377 QDomElement acceptVersionsParameterElement =
getParameterElement( doc, QStringLiteral(
"AcceptVersions" ),
378 QStringList() << QStringLiteral(
"1.1.0" ) << QStringLiteral(
"1.0.0" ) );
379 getCapabilitiesElement.appendChild( acceptVersionsParameterElement );
381 QDomElement acceptFormatsParameterElement =
getParameterElement( doc, QStringLiteral(
"AcceptFormats" ),
382 QStringList() << QStringLiteral(
"text/xml" ) );
383 getCapabilitiesElement.appendChild( acceptFormatsParameterElement );
385 oprationsElement.appendChild( getCapabilitiesElement );
388 QDomElement describeFeatureTypeElement = operationElement.cloneNode().toElement();
389 describeFeatureTypeElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"DescribeFeatureType" ) );
391 QDomElement dftOutputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"outputFormat" ),
392 QStringList() << QStringLiteral(
"XMLSCHEMA" )
393 << QStringLiteral(
"text/xml; subtype=gml/2.1.2" )
394 << QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) );
395 describeFeatureTypeElement.appendChild( dftOutputFormatParameterElement );
397 oprationsElement.appendChild( describeFeatureTypeElement );
400 QDomElement getFeatureElement = operationElement.cloneNode().toElement();
401 getFeatureElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"GetFeature" ) );
403 QDomElement gfOutputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"outputFormat" ),
404 QStringList() << QStringLiteral(
"text/xml; subtype=gml/2.1.2" )
405 << QStringLiteral(
"text/xml; subtype=gml/3.1.1" )
406 << QStringLiteral(
"application/vnd.geo+json" ) );
407 getFeatureElement.appendChild( gfOutputFormatParameterElement );
409 QDomElement resultTypeParameterElement =
getParameterElement( doc, QStringLiteral(
"resultType" ),
410 QStringList() << QStringLiteral(
"results" ) << QStringLiteral(
"hits" ) );
411 getFeatureElement.appendChild( resultTypeParameterElement );
413 oprationsElement.appendChild( getFeatureElement );
416 QDomElement transactionElement = operationElement.cloneNode().toElement();
417 transactionElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"Transaction" ) );
419 QDomElement inputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"inputFormat" ),
420 QStringList() << QStringLiteral(
"text/xml; subtype=gml/2.1.2" )
421 << QStringLiteral(
"text/xml; subtype=gml/3.1.1" )
422 << QStringLiteral(
"application/vnd.geo+json" ) );
423 transactionElement.appendChild( inputFormatParameterElement );
425 oprationsElement.appendChild( transactionElement );
427 return oprationsElement;
436 QDomElement featureTypeListElement = doc.createElement( QStringLiteral(
"FeatureTypeList" ) );
438 QDomElement operationsElement = doc.createElement( QStringLiteral(
"Operations" ) );
439 featureTypeListElement.appendChild( operationsElement );
441 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
442 QDomText queryText = doc.createTextNode(
"Query" );
443 operationElement.appendChild( queryText );
444 operationsElement.appendChild( operationElement );
450 for (
const QString &wfsLayerId : wfsLayerIds )
457 if ( layer->
type() != QgsMapLayer::LayerType::VectorLayer )
466 QDomElement layerElem = doc.createElement( QStringLiteral(
"FeatureType" ) );
469 QDomElement nameElem = doc.createElement( QStringLiteral(
"Name" ) );
470 QDomText nameText = doc.createTextNode(
layerTypeName( layer ) );
471 nameElem.appendChild( nameText );
472 layerElem.appendChild( nameElem );
475 QDomElement titleElem = doc.createElement( QStringLiteral(
"Title" ) );
476 QString title = layer->
title();
477 if ( title.isEmpty() )
479 title = layer->
name();
481 QDomText titleText = doc.createTextNode( title );
482 titleElem.appendChild( titleText );
483 layerElem.appendChild( titleElem );
486 QString
abstract = layer->
abstract();
487 if ( !
abstract.isEmpty() )
489 QDomElement abstractElem = doc.createElement( QStringLiteral(
"Abstract" ) );
490 QDomText abstractText = doc.createTextNode(
abstract );
491 abstractElem.appendChild( abstractText );
492 layerElem.appendChild( abstractElem );
497 if ( !keywords.isEmpty() )
499 QDomElement keywordsElem = doc.createElement( QStringLiteral(
"ows:Keywords" ) );
500 for (
const QString &keyword : keywords.split(
',' ) )
502 if ( !keyword.trimmed().isEmpty() )
504 QDomElement keywordElem = doc.createElement( QStringLiteral(
"ows:Keyword" ) );
505 QDomText keywordText = doc.createTextNode( keyword.trimmed() );
506 keywordElem.appendChild( keywordText );
507 keywordsElem.appendChild( keywordElem );
510 layerElem.appendChild( keywordsElem );
514 const QString defaultSrs = layer->
crs().
authid();
515 QDomElement srsElem = doc.createElement( QStringLiteral(
"DefaultSRS" ) );
516 QDomText srsText = doc.createTextNode( defaultSrs );
517 srsElem.appendChild( srsText );
518 layerElem.appendChild( srsElem );
522 for (
const QString &
crs : outputCrsList )
524 if (
crs == defaultSrs )
526 QDomElement otherSrsElem = doc.createElement( QStringLiteral(
"OtherSRS" ) );
527 QDomText otherSrsText = doc.createTextNode(
crs );
528 otherSrsElem.appendChild( otherSrsText );
529 layerElem.appendChild( otherSrsElem );
533 QDomElement operationsElement = doc.createElement( QStringLiteral(
"Operations" ) );
535 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
536 QDomText queryText = doc.createTextNode( QStringLiteral(
"Query" ) );
537 operationElement.appendChild( queryText );
538 operationsElement.appendChild( operationElement );
540 if ( wfstUpdateLayersId.contains( layer->
id() ) ||
541 wfstInsertLayersId.contains( layer->
id() ) ||
542 wfstDeleteLayersId.contains( layer->
id() ) )
549 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
550 QDomText insertText = doc.createTextNode( QStringLiteral(
"Insert" ) );
551 operationElement.appendChild( insertText );
552 operationsElement.appendChild( operationElement );
557 wfstUpdateLayersId.contains( layer->
id() ) )
560 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
561 QDomText updateText = doc.createTextNode( QStringLiteral(
"Update" ) );
562 operationElement.appendChild( updateText );
563 operationsElement.appendChild( operationElement );
569 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
570 QDomText deleteText = doc.createTextNode( QStringLiteral(
"Delete" ) );
571 operationElement.appendChild( deleteText );
572 operationsElement.appendChild( operationElement );
576 layerElem.appendChild( operationsElement );
579 QDomElement outputFormatsElem = doc.createElement( QStringLiteral(
"OutputFormats" ) );
580 QDomElement outputFormatElem = doc.createElement( QStringLiteral(
"Format" ) );
581 QDomText outputFormatText = doc.createTextNode( QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) );
582 outputFormatElem.appendChild( outputFormatText );
583 outputFormatsElem.appendChild( outputFormatElem );
584 layerElem.appendChild( outputFormatsElem );
591 if ( !layerExtent.
isNull() )
596 wgs84BoundingRect = exGeoTransform.transformBoundingBox( layerExtent );
605 QDomElement bBoxElement = doc.createElement( QStringLiteral(
"ows:WGS84BoundingBox" ) );
606 bBoxElement.setAttribute( QStringLiteral(
"dimensions" ), QStringLiteral(
"2" ) );
607 QDomElement lCornerElement = doc.createElement( QStringLiteral(
"ows:LowerCorner" ) );
608 QDomText lCornerText = doc.createTextNode( QString::number( wgs84BoundingRect.
xMinimum() ) +
" " + QString::number( wgs84BoundingRect.
yMinimum() ) );
609 lCornerElement.appendChild( lCornerText );
610 bBoxElement.appendChild( lCornerElement );
611 QDomElement uCornerElement = doc.createElement( QStringLiteral(
"ows:UpperCorner" ) );
612 QDomText uCornerText = doc.createTextNode( QString::number( wgs84BoundingRect.
xMaximum() ) +
" " + QString::number( wgs84BoundingRect.
yMaximum() ) );
613 uCornerElement.appendChild( uCornerText );
614 bBoxElement.appendChild( uCornerElement );
615 layerElem.appendChild( bBoxElement );
619 if ( !metadataUrl.isEmpty() )
621 QDomElement metaUrlElem = doc.createElement( QStringLiteral(
"MetadataURL" ) );
623 metaUrlElem.setAttribute( QStringLiteral(
"type" ), metadataUrlType );
625 metaUrlElem.setAttribute( QStringLiteral(
"format" ), metadataUrlFormat );
626 QDomText metaUrlText = doc.createTextNode( metadataUrl );
627 metaUrlElem.appendChild( metaUrlText );
628 layerElem.appendChild( metaUrlElem );
631 featureTypeListElement.appendChild( layerElem );
634 return featureTypeListElement;
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...
SERVER_EXPORT QStringList wmsOutputCrsList(const QgsProject &project)
Returns the WMS output CRS list.
QDomElement getParameterElement(QDomDocument &doc, const QString &name, const QStringList &values)
Create a parameter element.
A rectangle specified with double values.
Base class for all map layer types.
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...
QDomDocument createGetCapabilitiesDocument(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request)
Create get capabilities document.
SERVER_EXPORT QString owsServiceContactPosition(const QgsProject &project)
Returns the owsService contact position defined in project.
SERVER_EXPORT QString owsServiceContactPerson(const QgsProject &project)
Returns the owsService contact person defined in project.
SERVER_EXPORT QStringList owsServiceKeywords(const QgsProject &project)
Returns the owsService keywords defined in project.
QDomElement getFeatureTypeListElement(QDomDocument &doc, QgsServerInterface *serverIface, const QgsProject *project)
Create FeatureTypeList element for get capabilities document.
SERVER_EXPORT QString owsServiceAbstract(const QgsProject &project)
Returns the owsService abstract defined in project.
QString abstract() const
Returns the abstract of the layer used by QGIS Server in GetCapabilities request. ...
const QgsCoordinateReferenceSystem & crs
virtual void write(const QString &data)
Write string This is a convenient method that will write directly to the underlying I/O device...
QgsMapLayer::LayerType type() const
Returns the type of the layer.
QString layerTypeName(const QgsMapLayer *layer)
Returns typename from vector layer.
virtual QgsRectangle extent() const
Returns the extent of the layer.
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
QString serviceUrl(const QgsServerRequest &request, const QgsProject *project)
Service URL string.
QString id() const
Returns the layer's unique ID, which is used to access this layer from QgsProject.
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...
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
QDomElement getServiceIdentificationElement(QDomDocument &doc, const QgsProject *project)
Create Service Identification element for get capabilities document.
const QString GML_NAMESPACE
const QString WFS_NAMESPACE
A helper class that centralizes caches accesses given by all the server cache filter plugins...
Allows modifications of geometries.
Reads and writes project states.
const QString GEO_EPSG_CRS_AUTHID
Geographic coord sys from EPSG authority.
QDomElement getOperationsMetadataElement(QDomDocument &doc, const QgsProject *project, const QgsServerRequest &request)
Create OperationsMetadata element for get capabilities document.
QString implementationVersion()
Returns the highest version supported by this implementation.
SERVER_EXPORT QString owsServiceFees(const QgsProject &project)
Returns the owsService fees defined in project.
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.
SERVER_EXPORT QString owsServiceAccessConstraints(const QgsProject &project)
Returns the owsService access constraints defined in project.
SERVER_EXPORT QString owsServiceOnlineResource(const QgsProject &project)
Returns the owsService online resource defined in project.
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
SERVER_EXPORT QString owsServiceContactOrganization(const QgsProject &project)
Returns the owsService contact organization defined in project.
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
const QString OGC_NAMESPACE
double xMaximum() const
Returns the x maximum value (right side of rectangle).
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
bool layerReadPermission(const QgsMapLayer *layer) const
Returns the layer read right.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
static QgsCoordinateReferenceSystem fromOgcWmsCrs(const QString &ogcCrs)
Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
SERVER_EXPORT QStringList wfsLayerIds(const QgsProject &project)
Returns the Layer ids list defined in a QGIS project as published in WFS.
This class represents a coordinate reference system (CRS).
bool isNull() const
Test if the rectangle is null (all coordinates zero or after call to setMinimal()).
bool setCachedDocument(const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const
Updates or inserts the document in cache like capabilities.
virtual QgsServerCacheManager * cacheManager() const =0
Gets the registered server cache filters.
double xMinimum() const
Returns the x minimum value (left side of rectangle).
A helper class that centralizes restrictions given by all the access control filter plugins...
QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
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...
void writeGetCapabilities(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output WFS GetCapabilities response.
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Allows deletion of features.
double yMaximum() const
Returns the y maximum value (top side of rectangle).
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
Custom exception class for Coordinate Reference System related exceptions.
virtual QgsAccessControl * accessControls() const =0
Gets the registered access control filters.
SERVER_EXPORT QString owsServiceContactMail(const QgsProject &project)
Returns the owsService contact mail defined in project.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be null.
This is the base class for vector data providers.
QDomElement getServiceProviderElement(QDomDocument &doc, const QgsProject *project)
Create Service Provider element for get capabilities document.
Represents a vector layer which manages a vector based data sets.
Allows modification of attribute values.
QString authid() const
Returns the authority identifier for the CRS.
SERVER_EXPORT QString owsServiceTitle(const QgsProject &project)
Returns the owsService title defined in project.
QgsCoordinateReferenceSystem crs
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
SERVER_EXPORT QString owsServiceContactPhone(const QgsProject &project)
Returns the owsService contact phone defined in project.