QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgswfsutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswfsutils.h
3 
4  Define WFS service utility functions
5  ------------------------------------
6  begin : December 20 , 2016
7  copyright : (C) 2007 by Marco Hugentobler ( parts from qgswfshandler)
8  (C) 2012 by RenĂ©-Luc D'Hont ( parts from qgswmshandler)
9  (C) 2014 by Alessandro Pasotti ( parts from qgswfshandler)
10  (C) 2017 by David Marteau
11  email : marco dot hugentobler at karto dot baug dot ethz dot ch
12  a dot pasotti at itopen dot it
13  david dot marteau at 3liz dot com
14  ***************************************************************************/
15 
16 /***************************************************************************
17  * *
18  * This program is free software; you can redistribute it and/or modify *
19  * it under the terms of the GNU General Public License as published by *
20  * the Free Software Foundation; either version 2 of the License, or *
21  * (at your option) any later version. *
22  * *
23  ***************************************************************************/
24 #ifndef QGSWFSUTILS_H
25 #define QGSWFSUTILS_H
26 
27 #include "qgsmodule.h"
28 #include "qgsfeaturerequest.h"
29 #include "qgswfsserviceexception.h"
30 #include "qgsserversettings.h"
31 
37 namespace QgsWfs
39 {
40 
44  QString implementationVersion();
45 
49  QString serviceUrl( const QgsServerRequest &request, const QgsProject *project, const QgsServerSettings &settings );
50 
54  QString layerTypeName( const QgsMapLayer *layer );
55 
59  QgsVectorLayer *layerByTypeName( const QgsProject *project, const QString &typeName );
60 
64  QgsFeatureRequest parseFilterElement( const QString &typeName, QDomElement &filterElem, QgsProject *project = nullptr );
65 
69  QgsFeatureRequest parseFilterElement( const QString &typeName, QDomElement &filterElem, QStringList &serverFids, const QgsProject *project = nullptr, const QgsMapLayer *layer = nullptr );
70 
71  // Define namespaces used in WFS documents
72  const QString WFS_NAMESPACE = QStringLiteral( "http://www.opengis.net/wfs" );
73  const QString GML_NAMESPACE = QStringLiteral( "http://www.opengis.net/gml" );
74  const QString OGC_NAMESPACE = QStringLiteral( "http://www.opengis.net/ogc" );
75  const QString QGS_NAMESPACE = QStringLiteral( "http://www.qgis.org/gml" );
76 
77  // Define clean tagName regExp
78  const QRegExp cleanTagNameRegExp( "(?![\\w\\d\\.-])." );
79 
80 } // namespace QgsWfs
81 
82 #endif
83 
84 
qgsserversettings.h
qgsfeaturerequest.h
QgsWfs::parseFilterElement
QgsFeatureRequest parseFilterElement(const QString &typeName, QDomElement &filterElem, QgsProject *project)
Transform a Filter element to a feature request.
Definition: qgswfsutils.cpp:119
QgsWfs::layerByTypeName
QgsVectorLayer * layerByTypeName(const QgsProject *project, const QString &typeName)
Retrieve a layer by typename.
Definition: qgswfsutils.cpp:96
QgsWfs::layerTypeName
QString layerTypeName(const QgsMapLayer *layer)
Returns typename from vector layer.
Definition: qgswfsutils.cpp:87
QgsServerRequest
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Definition: qgsserverrequest.h:38
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:103
QgsWfs::WFS_NAMESPACE
const QString WFS_NAMESPACE
Definition: qgswfsutils.h:92
QgsServerSettings
Provides a way to retrieve settings by prioritizing according to environment variables,...
Definition: qgsserversettings.h:92
QgsFeatureRequest
This class wraps a request for features to a vector layer (or directly its vector data provider).
Definition: qgsfeaturerequest.h:83
QgsWfs::serviceUrl
QString serviceUrl(const QgsServerRequest &request, const QgsProject *project, const QgsServerSettings &settings)
Service URL string.
Definition: qgswfsutils.cpp:55
QgsWfs::GML_NAMESPACE
const QString GML_NAMESPACE
Definition: qgswfsutils.h:93
QgsWfs::OGC_NAMESPACE
const QString OGC_NAMESPACE
Definition: qgswfsutils.h:94
QgsWfs
WMS implementation.
Definition: qgswfs.cpp:35
typeName
const QString & typeName
Definition: qgswfsgetfeature.cpp:109
QgsWfs::implementationVersion
QString implementationVersion()
Returns the highest version supported by this implementation.
Definition: qgswfsutils.cpp:50
QgsWfs::cleanTagNameRegExp
const QRegExp cleanTagNameRegExp("(?![\\w\\d\\.-]).")
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:391
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition: qgsmaplayer.h:72
qgsmodule.h
qgswfsserviceexception.h
QgsWfs::QGS_NAMESPACE
const QString QGS_NAMESPACE
Definition: qgswfsutils.h:95