Skip to content
Permalink
Browse files

Add documentation

  • Loading branch information
pblottiere committed Sep 13, 2018
1 parent 38fc046 commit a99b5201149b04a823ca4dcde7572f4b46688395
Showing with 77 additions and 0 deletions.
  1. +9 −0 python/core/auto_generated/qgsogcutils.sip.in
  2. +68 −0 src/core/qgsogcutils.h
@@ -150,6 +150,15 @@ according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
};

static QgsExpression *expressionFromOgcFilter( const QDomElement &element, FilterVersion version, QgsVectorLayer *layer = 0 ) /Factory/;
%Docstring
Returns an expression from a WFS filter embedded in a document.

:param element: The WFS Filter
:param version: The WFS version
:param layer: Layer to use to retrieve field values from literal filters

.. versionadded:: 3.4
%End


static QDomElement expressionToOgcExpression( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage = 0 );
@@ -161,6 +161,13 @@ class CORE_EXPORT QgsOgcUtils
FILTER_FES_2_0
};

/**
* Returns an expression from a WFS filter embedded in a document.
* \param element The WFS Filter
* \param version The WFS version
* \param layer Layer to use to retrieve field values from literal filters
* \since QGIS 3.4
*/
static QgsExpression *expressionFromOgcFilter( const QDomElement &element, FilterVersion version, QgsVectorLayer *layer = nullptr ) SIP_FACTORY;

/**
@@ -369,23 +376,84 @@ class QgsOgcUtilsExprToFilter
QDomElement expressionFunctionToOgcFilter( const QgsExpressionNodeFunction *node, QgsExpression *expression, const QgsExpressionContext *context );
};

/**
* \ingroup core
* \brief Internal use by QgsOgcUtils
* \note not available in Python bindings
* \since QGIS 3.4
*/
class QgsOgcUtilsExprFromFilter
{
public:

/**
* Constructor for QgsOgcUtilsExprFromFilter.
* \param version WFS Version
* \param layer Layer to use to retrieve field values from literal filters
*/
QgsOgcUtilsExprFromFilter( QgsOgcUtils::FilterVersion version = QgsOgcUtils::FILTER_OGC_1_0,
QgsVectorLayer *layer = nullptr );

/**
* Returns an expression node from a WFS filter embedded in a document
* element. A null pointer is returned when an error happened.
* \param element The WFS filter
*/
QgsExpressionNode *nodeFromOgcFilter( const QDomElement &element );

/**
* Returns the underlying error message, or an empty string in case of no
* error.
*/
QString errorMessage() const;

/**
* Returns an expression node from a WFS filter embedded in a document with
* binary operators.
*
*/
QgsExpressionNodeBinaryOperator *nodeBinaryOperatorFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* spatial operators.
*/
QgsExpressionNodeFunction *nodeSpatialOperatorFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* column references.
*/
QgsExpressionNodeColumnRef *nodeColumnRefFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* literal tag.
*/
QgsExpressionNode *nodeLiteralFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* Not operator.
*/
QgsExpressionNodeUnaryOperator *nodeNotFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* IsNull operator.
*/
QgsExpressionNodeBinaryOperator *nodePropertyIsNullFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* functions.
*/
QgsExpressionNodeFunction *nodeFunctionFromOgcFilter( const QDomElement &element );

/**
* Returns an expression node from a WFS filter embedded in a document with
* boudnaries operator.
*/
QgsExpressionNode *nodeIsBetweenFromOgcFilter( const QDomElement &element );

private:

0 comments on commit a99b520

Please sign in to comment.
You can’t perform that action at this time.