100 static QgsRectangle rectangleFromGMLBox(
const QDomNode &boxNode );
103 static QgsRectangle rectangleFromGMLEnvelope(
const QDomNode &envelopeNode );
109 static QDomElement geometryToGML(
110 const QgsGeometry &geometry, QDomDocument &doc,
QgsOgcUtils::GMLVersion gmlVersion,
const QString &srsName,
bool invertAxisOrientation,
const QString &gmlIdBase,
int precision = 17
117 static QDomElement geometryToGML(
const QgsGeometry &geometry, QDomDocument &doc,
const QString &format,
int precision = 17 );
123 static QDomElement geometryToGML(
const QgsGeometry &geometry, QDomDocument &doc,
int precision = 17 );
129 static QDomElement rectangleToGMLBox(
const QgsRectangle *box, QDomDocument &doc,
int precision = 17 );
135 static QDomElement rectangleToGMLBox(
const QgsRectangle *box, QDomDocument &doc,
const QString &srsName,
bool invertAxisOrientation,
int precision = 17 );
141 static QDomElement rectangleToGMLEnvelope(
const QgsRectangle *env, QDomDocument &doc,
int precision = 17 );
147 static QDomElement rectangleToGMLEnvelope(
const QgsRectangle *env, QDomDocument &doc,
const QString &srsName,
bool invertAxisOrientation,
int precision = 17 );
151 static QColor colorFromOgcFill(
const QDomElement &fillElement );
162 static QDomElement expressionToOgcFilter( const
QgsExpression &exp, QDomDocument &doc, QString *errorMessage =
nullptr );
190 static QDomElement expressionToOgcFilter(
194 FilterVersion filterVersion,
195 const QString &namespacePrefix,
196 const QString &namespaceURI,
197 const QString &geometryName,
198 const QString &srsName,
199 bool honourAxisOrientation,
200 bool invertAxisOrientation,
201 QString *errorMessage =
nullptr,
202 const QMap<QString, QString> &fieldNameToXPathMap = QMap<QString, QString>(),
203 const QMap<QString, QString> &namespacePrefixToUriMap = QMap<QString, QString>()
212 static QDomElement expressionToOgcExpression( const
QgsExpression &exp, QDomDocument &doc, QString *errorMessage =
nullptr,
bool requiresFilterElement = false );
219 static QDomElement elseFilterExpression( QDomDocument &doc );
226 static QDomElement expressionToOgcExpression(
230 FilterVersion filterVersion,
231 const QString &geometryName,
232 const QString &srsName,
233 bool honourAxisOrientation,
234 bool invertAxisOrientation,
235 QString *errorMessage =
nullptr,
236 bool requiresFilterElement = false,
237 const QMap<QString, QString> &fieldNameToXPathMap = QMap<QString, QString>(),
238 const QMap<QString, QString> &namespacePrefixToUriMap = QMap<QString, QString>()
288 const QList<LayerProperties> &layerProperties,
289 bool honourAxisOrientation,
290 bool invertAxisOrientation,
291 const QMap< QString, QString> &mapUnprefixedTypenameToPrefixedTypename,
292 QString *errorMessage =
nullptr,
293 const QMap<QString, QString> &fieldNameToXPathMap = QMap<QString, QString>(),
294 const QMap<QString, QString> &namespacePrefixToUriMap = QMap<QString, QString>()
307 static
QgsGeometry geometryFromGMLPoint( const QDomElement &geometryElement );
309 static
QgsGeometry geometryFromGMLLineString( const QDomElement &geometryElement );
311 static
QgsGeometry geometryFromGMLPolygon( const QDomElement &geometryElement );
313 static
QgsGeometry geometryFromGMLMultiPoint( const QDomElement &geometryElement );
315 static
QgsGeometry geometryFromGMLMultiLineString( const QDomElement &geometryElement );
317 static
QgsGeometry geometryFromGMLMultiCurve( const QDomElement &geometryElement );
319 static
QgsGeometry geometryFromGMLMultiPolygon( const QDomElement &geometryElement );
321 static
QgsGeometry geometryFromGMLUsingGdal( const QDomElement &geometryElement );
335 static
bool readGMLCoordinates(
QgsPolyline &coords, const QDomElement &elem );
345 static
bool readGMLPositions(
QgsPolyline &coords, const QDomElement &elem );
353 static QDomElement createGMLCoordinates( const
QgsPolylineXY &points, QDomDocument &doc );
361 static QDomElement createGMLPositions( const
QgsPolylineXY &points, QDomDocument &doc );
378 static
QgsExpressionNode *nodeIsBetweenFromOgcFilter( QDomElement &element, QString &errorMessage );
399 const QString &namespacePrefix,
400 const QString &namespaceURI,
401 const QString &geometryName,
402 const QString &srsName,
403 bool honourAxisOrientation,
404 bool invertAxisOrientation,
405 const QMap<QString, QString> &fieldNameToXPathMap,
406 const QMap<QString, QString> &namespacePrefixToUriMap
420 bool mGMLUsed =
false;
423 QString mNamespacePrefix;
424 QString mNamespaceURI;
425 QString mGeometryName;
427 bool mInvertAxisOrientation;
428 QMap<QString, QString> mFieldNameToXPathMap;
429 QMap<QString, QString> mNamespacePrefixToUriMap;
430 QString mErrorMessage;
431 QString mFilterPrefix;
432 QString mPropertyName;
523 QString mErrorMessage;
524 QString mPropertyName;
541 const QList<QgsOgcUtils::LayerProperties> &layerProperties,
542 bool honourAxisOrientation,
543 bool invertAxisOrientation,
544 const QMap< QString, QString> &mapUnprefixedTypenameToPrefixedTypename,
545 const QMap<QString, QString> &fieldNameToXPathMap,
546 const QMap<QString, QString> &namespacePrefixToUriMap
560 bool mGMLUsed =
false;
563 const QList<QgsOgcUtils::LayerProperties> &mLayerProperties;
564 bool mHonourAxisOrientation;
565 bool mInvertAxisOrientation;
566 QString mErrorMessage;
567 QString mFilterPrefix;
568 QString mPropertyName;
570 QString mCurrentSRSName;
571 QMap<QString, QString> mMapTableAliasToNames;
572 const QMap< QString, QString> &mMapUnprefixedTypenameToPrefixedTypename;
573 const QMap<QString, QString> &mFieldNameToXPathMap;
574 const QMap<QString, QString> &mNamespacePrefixToUriMap;
588 bool processSRSName(
const QgsSQLStatement::NodeFunction *mainNode, QList<QgsSQLStatement::Node *> args,
bool lastArgIsSRSName, QString &srsName,
bool &axisInversion );
620 static CRSFlavor parseCrsName(
const QString &crsName, QString &authority, QString &code );
Provides global constants and enumerations for use throughout the application.
Contains information about the context in which a coordinate transform is executed.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
A binary expression operator, which operates on two values.
An expression node which takes its value from a feature's field.
An expression node for expression functions.
An expression node for value IN or NOT IN clauses.
An expression node for literal values.
A unary node is either negative as in boolean (not) or as in numbers (minus).
Abstract base class for all nodes that can appear in an expression.
Handles parsing and evaluation of expressions (formerly called "search strings").
A geometry is the spatial representation of a feature.
Base class for all map layer types.
Utilities related to OGC CRS encodings.
QgsOgcUtilsExprToFilter(QDomDocument &doc, QgsOgcUtils::GMLVersion gmlVersion, QgsOgcUtils::FilterVersion filterVersion, const QString &namespacePrefix, const QString &namespaceURI, const QString &geometryName, const QString &srsName, bool honourAxisOrientation, bool invertAxisOrientation, const QMap< QString, QString > &fieldNameToXPathMap, const QMap< QString, QString > &namespacePrefixToUriMap)
Constructor.
bool GMLNamespaceUsed() const
Returns whether the gml: namespace is used.
QDomElement expressionNodeToOgcFilter(const QgsExpressionNode *node, QgsExpression *expression, const QgsExpressionContext *context)
Convert an expression to a OGC filter.
QString errorMessage() const
Returns the error message.
QgsExpressionNodeFunction * nodeSpatialOperatorFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with spatial operators.
QgsExpressionNodeUnaryOperator * nodeNotFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with Not operator.
QgsExpressionNodeColumnRef * nodeColumnRefFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with column references.
QgsExpressionNode * nodeIsBetweenFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with boundaries operator.
QgsOgcUtilsExpressionFromFilter(QgsOgcUtils::FilterVersion version=QgsOgcUtils::FILTER_OGC_1_0, const QgsVectorLayer *layer=nullptr)
Constructor for QgsOgcUtilsExpressionFromFilter.
QgsExpressionNodeBinaryOperator * nodeBinaryOperatorFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with binary operators.
QgsExpressionNodeFunction * nodeFunctionFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with functions.
QgsExpressionNode * nodeFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document element.
QgsExpressionNodeBinaryOperator * nodePropertyIsNullFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with IsNull operator.
QString errorMessage() const
Returns the underlying error message, or an empty string in case of no error.
QgsExpressionNode * nodeLiteralFromOgcFilter(const QDomElement &element)
Returns an expression node from a WFS filter embedded in a document with literal tag.
QgsOgcUtilsSQLStatementToFilter(QDomDocument &doc, QgsOgcUtils::GMLVersion gmlVersion, QgsOgcUtils::FilterVersion filterVersion, const QList< QgsOgcUtils::LayerProperties > &layerProperties, bool honourAxisOrientation, bool invertAxisOrientation, const QMap< QString, QString > &mapUnprefixedTypenameToPrefixedTypename, const QMap< QString, QString > &fieldNameToXPathMap, const QMap< QString, QString > &namespacePrefixToUriMap)
Constructor.
QDomElement toOgcFilter(const QgsSQLStatement::Node *node)
Convert a SQL statement to a OGC filter.
bool GMLNamespaceUsed() const
Returns whether the gml: namespace is used.
QString errorMessage() const
Returns the error message.
QString mSRSName
SRS name.
LayerProperties()=default
QString mNamespaceURI
Namespace URI.
QString mNamespacePrefix
Namespace prefix.
QString mGeometryAttribute
Geometry attribute name.
Provides various utility functions for conversion between OGC (Open Geospatial Consortium) standards ...
FilterVersion
OGC filter version.
static QDomElement SQLStatementToOgcFilter(const QgsSQLStatement &statement, QDomDocument &doc, QgsOgcUtils::GMLVersion gmlVersion, FilterVersion filterVersion, const QList< LayerProperties > &layerProperties, bool honourAxisOrientation, bool invertAxisOrientation, const QMap< QString, QString > &mapUnprefixedTypenameToPrefixedTypename, QString *errorMessage=nullptr, const QMap< QString, QString > &fieldNameToXPathMap=QMap< QString, QString >(), const QMap< QString, QString > &namespacePrefixToUriMap=QMap< QString, QString >())
Creates OGC filter XML element from the WHERE and JOIN clauses of a SQL statement.
static Qgis::WkbType geomTypeFromPropertyType(const QString &gmlGeomType)
Returns the Qgis::WkbType corresponding to a GML geometry type.
A rectangle specified with double values.
An 'X BETWEEN y and z' operator.
Binary logical/arithmetical operator (AND, OR, =, +, ...).
Function with a name and arguments node.
An 'x IN (y, z)' operator.
Literal value (integer, integer64, double, string).
Unary logical/arithmetical operator ( NOT, - ).
Abstract node class for SQL statement nodes.
Represents a vector layer which manages a vector based dataset.
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
QgsPointSequence QgsPolyline
Polyline as represented as a vector of points.
The Context struct stores the current layer and coordinate transform context.
const QgsMapLayer * layer
Context(const QgsMapLayer *layer=nullptr, const QgsCoordinateTransformContext &transformContext=QgsCoordinateTransformContext())
Constructs a Context from layer and transformContext.
QgsCoordinateTransformContext transformContext