33 #include <QStringList> 44 #ifdef HAVE_SERVER_PYTHON_PLUGINS 48 const QDomDocument *capabilitiesDocument =
nullptr;
50 #ifdef HAVE_SERVER_PYTHON_PLUGINS 52 if ( cacheManager && cacheManager->
getCachedDocument( &doc, project, request, accessControl ) )
54 capabilitiesDocument = &doc;
64 capabilitiesDocument = &doc;
68 capabilitiesDocument = &doc;
70 response.
setHeader( QStringLiteral(
"Content-Type" ), QStringLiteral(
"text/xml; charset=utf-8" ) );
71 response.
write( capabilitiesDocument->toByteArray() );
83 QDomElement wfsCapabilitiesElement = doc.createElement( QStringLiteral(
"WFS_Capabilities" ) );
84 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns" ),
WFS_NAMESPACE );
85 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:xsi" ), QStringLiteral(
"http://www.w3.org/2001/XMLSchema-instance" ) );
86 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xsi:schemaLocation" ),
WFS_NAMESPACE +
" http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd" );
87 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:ogc" ),
OGC_NAMESPACE );
88 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:gml" ),
GML_NAMESPACE );
89 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:ows" ), QStringLiteral(
"http://www.opengis.net/ows" ) );
90 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"xmlns:xlink" ), QStringLiteral(
"http://www.w3.org/1999/xlink" ) );
92 wfsCapabilitiesElement.setAttribute( QStringLiteral(
"updateSequence" ), QStringLiteral(
"0" ) );
93 doc.appendChild( wfsCapabilitiesElement );
111 QDomElement filterCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Filter_Capabilities" ) );
112 wfsCapabilitiesElement.appendChild( filterCapabilitiesElement );
113 QDomElement spatialCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Spatial_Capabilities" ) );
114 filterCapabilitiesElement.appendChild( spatialCapabilitiesElement );
116 QStringList geometryOperands;
117 geometryOperands << QStringLiteral(
"gml:Point" ) << QStringLiteral(
"gml:LineString" ) << QStringLiteral(
"gml:Polygon" )
118 << QStringLiteral(
"gml:Envelope" );
119 QDomElement geometryOperandsElem = doc.createElement( QStringLiteral(
"ogc:GeometryOperands" ) );
120 for (
const QString &geometryOperand : geometryOperands )
122 QDomElement geometryOperandElem = doc.createElement( QStringLiteral(
"ogc:GeometryOperand" ) );
123 QDomText geometryOperandText = doc.createTextNode( geometryOperand );
124 geometryOperandElem.appendChild( geometryOperandText );
125 geometryOperandsElem.appendChild( geometryOperandElem );
127 spatialCapabilitiesElement.appendChild( geometryOperandsElem );
129 QStringList spatialOperators;
130 spatialOperators << QStringLiteral(
"Equals" ) << QStringLiteral(
"Disjoint" ) << QStringLiteral(
"Touches" )
131 << QStringLiteral(
"Within" ) << QStringLiteral(
"Overlaps" ) << QStringLiteral(
"Crosses" )
132 << QStringLiteral(
"Intersects" ) << QStringLiteral(
"Contains" ) << QStringLiteral(
"DWithin" )
133 << QStringLiteral(
"Beyond" ) << QStringLiteral(
"BBOX" );
134 QDomElement spatialOperatorsElem = doc.createElement( QStringLiteral(
"ogc:SpatialOperators" ) );
135 for (
const QString &spatialOperator : spatialOperators )
137 QDomElement spatialOperatorElem = doc.createElement( QStringLiteral(
"ogc:SpatialOperator" ) );
138 spatialOperatorElem.setAttribute( QStringLiteral(
"name" ), spatialOperator );
139 spatialOperatorsElem.appendChild( spatialOperatorElem );
141 spatialCapabilitiesElement.appendChild( spatialOperatorsElem );
142 QDomElement scalarCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Scalar_Capabilities" ) );
143 filterCapabilitiesElement.appendChild( scalarCapabilitiesElement );
144 QDomElement logicalOperatorsElement = doc.createElement( QStringLiteral(
"ogc:LogicalOperators" ) );
145 scalarCapabilitiesElement.appendChild( logicalOperatorsElement );
147 QStringList comparisonOperators;
148 comparisonOperators << QStringLiteral(
"LessThan" ) << QStringLiteral(
"GreaterThan" )
149 << QStringLiteral(
"LessThanEqualTo" ) << QStringLiteral(
"GreaterThanEqualTo" )
150 << QStringLiteral(
"EqualTo" ) << QStringLiteral(
"Like" ) << QStringLiteral(
"Between" );
151 QDomElement comparisonOperatorsElem = doc.createElement( QStringLiteral(
"ogc:ComparisonOperators" ) );
152 for (
const QString &comparisonOperator : comparisonOperators )
154 QDomElement comparisonOperatorElem = doc.createElement( QStringLiteral(
"ogc:ComparisonOperator" ) );
155 QDomText comparisonOperatorText = doc.createTextNode( comparisonOperator );
156 comparisonOperatorElem.appendChild( comparisonOperatorText );
157 comparisonOperatorsElem.appendChild( comparisonOperatorElem );
159 scalarCapabilitiesElement.appendChild( comparisonOperatorsElem );
161 QDomElement idCapabilitiesElement = doc.createElement( QStringLiteral(
"ogc:Id_Capabilities" ) );
162 QDomElement fidElem = doc.createElement( QStringLiteral(
"ogc:FID" ) );
163 idCapabilitiesElement.appendChild( fidElem );
164 filterCapabilitiesElement.appendChild( idCapabilitiesElement );
173 QDomElement serviceElem = doc.createElement( QStringLiteral(
"ows:ServiceIdentification" ) );
176 if ( !title.isEmpty() )
178 QDomElement titleElem = doc.createElement( QStringLiteral(
"ows:Title" ) );
179 QDomText titleText = doc.createTextNode( title );
180 titleElem.appendChild( titleText );
181 serviceElem.appendChild( titleElem );
185 if ( !
abstract.isEmpty() )
187 QDomElement abstractElem = doc.createElement( QStringLiteral(
"ows:Abstract" ) );
188 QDomText abstractText = doc.createCDATASection(
abstract );
189 abstractElem.appendChild( abstractText );
190 serviceElem.appendChild( abstractElem );
194 if ( !keywords.isEmpty() && !keywords.join( QStringLiteral(
", " ) ).isEmpty() )
196 QDomElement keywordsElem = doc.createElement( QStringLiteral(
"ows:Keywords" ) );
197 for (
const QString &keyword : keywords )
199 if ( !keyword.isEmpty() )
201 QDomElement keywordElem = doc.createElement( QStringLiteral(
"ows:Keyword" ) );
202 QDomText keywordText = doc.createTextNode( keyword );
203 keywordElem.appendChild( keywordText );
204 keywordsElem.appendChild( keywordElem );
207 serviceElem.appendChild( keywordsElem );
211 QDomElement serviceTypeElem = doc.createElement( QStringLiteral(
"ows:ServiceType" ) );
212 QDomText serviceTypeText = doc.createTextNode(
"WFS" );
213 serviceTypeElem.appendChild( serviceTypeText );
214 serviceElem.appendChild( serviceTypeElem );
217 QDomElement serviceTypeVersionElem = doc.createElement( QStringLiteral(
"ows:ServiceTypeVersion" ) );
218 QDomText serviceTypeVersionText = doc.createTextNode(
"1.1.0" );
219 serviceTypeVersionElem.appendChild( serviceTypeVersionText );
220 serviceElem.appendChild( serviceTypeVersionElem );
222 QDomElement feesElem = doc.createElement( QStringLiteral(
"ows:Fees" ) );
223 QDomText feesText = doc.createTextNode(
"None" );
225 if ( !fees.isEmpty() )
227 feesText = doc.createTextNode( fees );
229 feesElem.appendChild( feesText );
230 serviceElem.appendChild( feesElem );
232 QDomElement accessConstraintsElem = doc.createElement( QStringLiteral(
"ows:AccessConstraints" ) );
234 QDomText accessConstraintsText = doc.createTextNode(
"None" );
235 if ( !accessConstraints.isEmpty() )
237 accessConstraintsText = doc.createTextNode( accessConstraints );
239 accessConstraintsElem.appendChild( accessConstraintsText );
240 serviceElem.appendChild( accessConstraintsElem );
249 QDomElement serviceElem = doc.createElement( QStringLiteral(
"ows:ServiceProvider" ) );
253 if ( !contactOrganization.isEmpty() )
255 QDomElement providerNameElem = doc.createElement( QStringLiteral(
"ows:ProviderName" ) );
256 QDomText providerNameText = doc.createTextNode( contactOrganization );
257 providerNameElem.appendChild( providerNameText );
258 serviceElem.appendChild( providerNameElem );
263 if ( !contactPerson.isEmpty() ||
264 !contactPosition.isEmpty() )
267 QDomElement serviceContactElem = doc.createElement( QStringLiteral(
"ows:ServiceContact" ) );
269 if ( !contactPerson.isEmpty() )
271 QDomElement individualNameElem = doc.createElement( QStringLiteral(
"ows:IndividualName" ) );
272 QDomText individualNameText = doc.createTextNode( contactPerson );
273 individualNameElem.appendChild( individualNameText );
274 serviceContactElem.appendChild( individualNameElem );
277 if ( !contactPosition.isEmpty() )
279 QDomElement positionNameElem = doc.createElement( QStringLiteral(
"ows:PositionName" ) );
280 QDomText positionNameText = doc.createTextNode( contactPosition );
281 positionNameElem.appendChild( positionNameText );
282 serviceContactElem.appendChild( positionNameElem );
288 if ( !contactMail.isEmpty() ||
289 !contactPhone.isEmpty() ||
290 !onlineResource.isEmpty() )
293 QDomElement contactInfoElem = doc.createElement( QStringLiteral(
"ows:ContactInfo" ) );
295 if ( !contactPhone.isEmpty() )
297 QDomElement phoneElem = doc.createElement( QStringLiteral(
"ows:Phone" ) );
298 QDomElement voiceElem = doc.createElement( QStringLiteral(
"ows:Voice" ) );
299 QDomText voiceText = doc.createTextNode( contactPhone );
300 voiceElem.appendChild( voiceText );
301 phoneElem.appendChild( voiceElem );
302 contactInfoElem.appendChild( phoneElem );
305 if ( !contactMail.isEmpty() )
307 QDomElement addressElem = doc.createElement( QStringLiteral(
"ows:Address" ) );
308 QDomElement mailElem = doc.createElement( QStringLiteral(
"ows:ElectronicMailAddress" ) );
309 QDomText mailText = doc.createTextNode( contactMail );
310 mailElem.appendChild( mailText );
311 addressElem.appendChild( mailElem );
312 contactInfoElem.appendChild( addressElem );
315 if ( !onlineResource.isEmpty() )
317 QDomElement onlineResourceElem = doc.createElement( QStringLiteral(
"ows:OnlineResource" ) );
318 onlineResourceElem.setAttribute(
"xlink:href", onlineResource );
319 contactInfoElem.appendChild( onlineResourceElem );
323 QDomElement roleElem = doc.createElement( QStringLiteral(
"ows:Role" ) );
324 QDomText roleText = doc.createTextNode(
"PointOfContact" );
325 roleElem.appendChild( roleText );
326 serviceContactElem.appendChild( roleElem );
328 serviceElem.appendChild( serviceContactElem );
337 QDomElement parameterElement = doc.createElement( QStringLiteral(
"ows:Parameter" ) );
338 parameterElement.setAttribute( QStringLiteral(
"name" ), name );
340 for (
const QString &v : values )
342 QDomElement valueElement = doc.createElement( QStringLiteral(
"ows:Value" ) );
343 QDomText valueText = doc.createTextNode( v );
344 valueElement.appendChild( valueText );
345 parameterElement.appendChild( valueElement );
348 return parameterElement;
353 QDomElement oprationsElement = doc.createElement( QStringLiteral(
"ows:OperationsMetadata" ) );
356 QString hrefString =
serviceUrl( request, project );
358 QDomElement operationElement = doc.createElement( QStringLiteral(
"ows:Operation" ) );
359 QDomElement dcpElement = doc.createElement( QStringLiteral(
"ows:DCP" ) );
360 QDomElement httpElement = doc.createElement( QStringLiteral(
"ows:HTTP" ) );
361 QDomElement getElement = doc.createElement( QStringLiteral(
"ows:Get" ) );
362 getElement.setAttribute( QStringLiteral(
"xlink:href" ), hrefString );
363 httpElement.appendChild( getElement );
365 QDomElement postElement = doc.createElement( QStringLiteral(
"ows:Post" ) );
366 postElement.setAttribute( QStringLiteral(
"xlink:href" ), hrefString );
367 httpElement.appendChild( postElement );
369 dcpElement.appendChild( httpElement );
370 operationElement.appendChild( dcpElement );
373 QDomElement getCapabilitiesElement = operationElement.cloneNode().toElement();
374 getCapabilitiesElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"GetCapabilities" ) );
376 QDomElement serviceParameterElement =
getParameterElement( doc, QStringLiteral(
"service" ),
377 QStringList() << QStringLiteral(
"WFS" ) );
378 getCapabilitiesElement.appendChild( serviceParameterElement );
380 QDomElement acceptVersionsParameterElement =
getParameterElement( doc, QStringLiteral(
"AcceptVersions" ),
381 QStringList() << QStringLiteral(
"1.1.0" ) << QStringLiteral(
"1.0.0" ) );
382 getCapabilitiesElement.appendChild( acceptVersionsParameterElement );
384 QDomElement acceptFormatsParameterElement =
getParameterElement( doc, QStringLiteral(
"AcceptFormats" ),
385 QStringList() << QStringLiteral(
"text/xml" ) );
386 getCapabilitiesElement.appendChild( acceptFormatsParameterElement );
388 oprationsElement.appendChild( getCapabilitiesElement );
391 QDomElement describeFeatureTypeElement = operationElement.cloneNode().toElement();
392 describeFeatureTypeElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"DescribeFeatureType" ) );
394 QDomElement dftOutputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"outputFormat" ),
395 QStringList() << QStringLiteral(
"XMLSCHEMA" )
396 << QStringLiteral(
"text/xml; subtype=gml/2.1.2" )
397 << QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) );
398 describeFeatureTypeElement.appendChild( dftOutputFormatParameterElement );
400 oprationsElement.appendChild( describeFeatureTypeElement );
403 QDomElement getFeatureElement = operationElement.cloneNode().toElement();
404 getFeatureElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"GetFeature" ) );
406 QDomElement gfOutputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"outputFormat" ),
407 QStringList() << QStringLiteral(
"text/xml; subtype=gml/2.1.2" )
408 << QStringLiteral(
"text/xml; subtype=gml/3.1.1" )
409 << QStringLiteral(
"application/vnd.geo+json" ) );
410 getFeatureElement.appendChild( gfOutputFormatParameterElement );
412 QDomElement resultTypeParameterElement =
getParameterElement( doc, QStringLiteral(
"resultType" ),
413 QStringList() << QStringLiteral(
"results" ) << QStringLiteral(
"hits" ) );
414 getFeatureElement.appendChild( resultTypeParameterElement );
416 oprationsElement.appendChild( getFeatureElement );
419 QDomElement transactionElement = operationElement.cloneNode().toElement();
420 transactionElement.setAttribute( QStringLiteral(
"name" ), QStringLiteral(
"Transaction" ) );
422 QDomElement inputFormatParameterElement =
getParameterElement( doc, QStringLiteral(
"inputFormat" ),
423 QStringList() << QStringLiteral(
"text/xml; subtype=gml/2.1.2" )
424 << QStringLiteral(
"text/xml; subtype=gml/3.1.1" )
425 << QStringLiteral(
"application/vnd.geo+json" ) );
426 transactionElement.appendChild( inputFormatParameterElement );
428 oprationsElement.appendChild( transactionElement );
430 return oprationsElement;
436 #ifdef HAVE_SERVER_PYTHON_PLUGINS 443 QDomElement featureTypeListElement = doc.createElement( QStringLiteral(
"FeatureTypeList" ) );
445 QDomElement operationsElement = doc.createElement( QStringLiteral(
"Operations" ) );
446 featureTypeListElement.appendChild( operationsElement );
448 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
449 QDomText queryText = doc.createTextNode(
"Query" );
450 operationElement.appendChild( queryText );
451 operationsElement.appendChild( operationElement );
457 for (
const QString &wfsLayerId : wfsLayerIds )
464 if ( layer->
type() != QgsMapLayer::LayerType::VectorLayer )
473 QDomElement layerElem = doc.createElement( QStringLiteral(
"FeatureType" ) );
476 QDomElement nameElem = doc.createElement( QStringLiteral(
"Name" ) );
477 QDomText nameText = doc.createTextNode(
layerTypeName( layer ) );
478 nameElem.appendChild( nameText );
479 layerElem.appendChild( nameElem );
482 QDomElement titleElem = doc.createElement( QStringLiteral(
"Title" ) );
483 QString title = layer->
title();
484 if ( title.isEmpty() )
486 title = layer->
name();
488 QDomText titleText = doc.createTextNode( title );
489 titleElem.appendChild( titleText );
490 layerElem.appendChild( titleElem );
493 QString
abstract = layer->
abstract();
494 if ( !
abstract.isEmpty() )
496 QDomElement abstractElem = doc.createElement( QStringLiteral(
"Abstract" ) );
497 QDomText abstractText = doc.createTextNode(
abstract );
498 abstractElem.appendChild( abstractText );
499 layerElem.appendChild( abstractElem );
504 if ( !keywords.isEmpty() )
506 QDomElement keywordsElem = doc.createElement( QStringLiteral(
"ows:Keywords" ) );
507 for (
const QString &keyword : keywords.split(
',' ) )
509 if ( !keyword.trimmed().isEmpty() )
511 QDomElement keywordElem = doc.createElement( QStringLiteral(
"ows:Keyword" ) );
512 QDomText keywordText = doc.createTextNode( keyword.trimmed() );
513 keywordElem.appendChild( keywordText );
514 keywordsElem.appendChild( keywordElem );
517 layerElem.appendChild( keywordsElem );
521 const QString defaultSrs = layer->
crs().
authid();
522 QDomElement srsElem = doc.createElement( QStringLiteral(
"DefaultSRS" ) );
523 QDomText srsText = doc.createTextNode( defaultSrs );
524 srsElem.appendChild( srsText );
525 layerElem.appendChild( srsElem );
529 for (
const QString &
crs : outputCrsList )
531 if (
crs == defaultSrs )
533 QDomElement otherSrsElem = doc.createElement( QStringLiteral(
"OtherSRS" ) );
534 QDomText otherSrsText = doc.createTextNode(
crs );
535 otherSrsElem.appendChild( otherSrsText );
536 layerElem.appendChild( otherSrsElem );
540 QDomElement operationsElement = doc.createElement( QStringLiteral(
"Operations" ) );
542 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
543 QDomText queryText = doc.createTextNode( QStringLiteral(
"Query" ) );
544 operationElement.appendChild( queryText );
545 operationsElement.appendChild( operationElement );
547 if ( wfstUpdateLayersId.contains( layer->
id() ) ||
548 wfstInsertLayersId.contains( layer->
id() ) ||
549 wfstDeleteLayersId.contains( layer->
id() ) )
556 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
557 QDomText insertText = doc.createTextNode( QStringLiteral(
"Insert" ) );
558 operationElement.appendChild( insertText );
559 operationsElement.appendChild( operationElement );
564 wfstUpdateLayersId.contains( layer->
id() ) )
567 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
568 QDomText updateText = doc.createTextNode( QStringLiteral(
"Update" ) );
569 operationElement.appendChild( updateText );
570 operationsElement.appendChild( operationElement );
576 QDomElement operationElement = doc.createElement( QStringLiteral(
"Operation" ) );
577 QDomText deleteText = doc.createTextNode( QStringLiteral(
"Delete" ) );
578 operationElement.appendChild( deleteText );
579 operationsElement.appendChild( operationElement );
583 layerElem.appendChild( operationsElement );
586 QDomElement outputFormatsElem = doc.createElement( QStringLiteral(
"OutputFormats" ) );
587 QDomElement outputFormatElem = doc.createElement( QStringLiteral(
"Format" ) );
588 QDomText outputFormatText = doc.createTextNode( QStringLiteral(
"text/xml; subtype=gml/3.1.1" ) );
589 outputFormatElem.appendChild( outputFormatText );
590 outputFormatsElem.appendChild( outputFormatElem );
591 layerElem.appendChild( outputFormatsElem );
597 int wgs84precision = 6;
599 if ( !layerExtent.
isNull() )
604 wgs84BoundingRect = exGeoTransform.transformBoundingBox( layerExtent );
613 QDomElement bBoxElement = doc.createElement( QStringLiteral(
"ows:WGS84BoundingBox" ) );
614 bBoxElement.setAttribute( QStringLiteral(
"dimensions" ), QStringLiteral(
"2" ) );
615 QDomElement lCornerElement = doc.createElement( QStringLiteral(
"ows:LowerCorner" ) );
617 lCornerElement.appendChild( lCornerText );
618 bBoxElement.appendChild( lCornerElement );
619 QDomElement uCornerElement = doc.createElement( QStringLiteral(
"ows:UpperCorner" ) );
621 uCornerElement.appendChild( uCornerText );
622 bBoxElement.appendChild( uCornerElement );
623 layerElem.appendChild( bBoxElement );
627 if ( !metadataUrl.isEmpty() )
629 QDomElement metaUrlElem = doc.createElement( QStringLiteral(
"MetadataURL" ) );
631 metaUrlElem.setAttribute( QStringLiteral(
"type" ), metadataUrlType );
633 metaUrlElem.setAttribute( QStringLiteral(
"format" ), metadataUrlFormat );
634 QDomText metaUrlText = doc.createTextNode( metadataUrl );
635 metaUrlElem.appendChild( metaUrlText );
636 layerElem.appendChild( metaUrlElem );
639 featureTypeListElement.appendChild( layerElem );
642 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...
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.
QDomDocument createGetCapabilitiesDocument(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request)
Create get capabilities document.
QgsMapLayer::LayerType type() const
Returns the type of the layer.
bool setCachedDocument(const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const
Updates or inserts the document in cache like capabilities.
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.
double yMaximum() const
Returns the y maximum value (top side of rectangle).
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.
bool isNull() const
Test if the rectangle is null (all coordinates zero or after call to setMinimal()).
QString title() const
Returns the title 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...
QString layerTypeName(const QgsMapLayer *layer)
Returns typename from vector layer.
QString serviceUrl(const QgsServerRequest &request, const QgsProject *project)
Service URL string.
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
double xMaximum() const
Returns the x maximum value (right side of rectangle).
virtual QgsRectangle extent() const
Returns the extent of the layer.
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 qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
SERVER_EXPORT double floorWithPrecision(double number, int places)
Returns a double less than number to the specified number of places.
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.
QString id() const
Returns the layer's unique ID, which is used to access this layer from QgsProject.
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.
QString abstract() const
Returns the abstract of the layer used by QGIS Server in GetCapabilities request. ...
SERVER_EXPORT QString owsServiceFees(const QgsProject &project)
Returns the owsService fees defined in project.
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 QString owsServiceOnlineResource(const QgsProject &project)
Returns the owsService online resource defined in project.
SERVER_EXPORT QString owsServiceContactOrganization(const QgsProject &project)
Returns the owsService contact organization defined in project.
const QString OGC_NAMESPACE
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
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.
QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
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).
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
QString authid() const
Returns the authority identifier for the CRS.
virtual QgsServerCacheManager * cacheManager() const =0
Gets the registered server cache filters.
A helper class that centralizes restrictions given by all the access control filter plugins...
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.
Allows deletion of features.
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.
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
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.
double xMinimum() const
Returns the x minimum value (left side of rectangle).
Allows modification of attribute values.
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
SERVER_EXPORT QString owsServiceTitle(const QgsProject &project)
Returns the owsService title defined in project.
QgsCoordinateReferenceSystem crs
SERVER_EXPORT QString owsServiceContactPhone(const QgsProject &project)
Returns the owsService contact phone defined in project.
bool layerReadPermission(const QgsMapLayer *layer) const
Returns the layer read right.