24 #include "qgis_core.h" 36 #include "qgsexpression.h" 37 #include "qgsexpressionnode.h" 38 #include "qgsexpressionnodeimpl.h" 69 static QgsGeometry geometryFromGML(
const QString &xmlString );
74 static QgsGeometry geometryFromGML(
const QDomNode &geometryNode );
77 static QgsRectangle rectangleFromGMLBox(
const QDomNode &boxNode );
80 static QgsRectangle rectangleFromGMLEnvelope(
const QDomNode &envelopeNode );
87 static QDomElement geometryToGML(
const QgsGeometry &geometry, QDomDocument &doc,
89 const QString &srsName,
90 bool invertAxisOrientation,
91 const QString &gmlIdBase,
98 static QDomElement geometryToGML(
const QgsGeometry &geometry, QDomDocument &doc,
const QString &format,
int precision = 17 );
104 static QDomElement geometryToGML(
const QgsGeometry &geometry, QDomDocument &doc,
int precision = 17 );
110 static QDomElement rectangleToGMLBox(
QgsRectangle *box, QDomDocument &doc,
int precision = 17 );
117 static QDomElement rectangleToGMLBox(
QgsRectangle *box, QDomDocument &doc,
118 const QString &srsName,
119 bool invertAxisOrientation,
120 int precision = 17 );
126 static QDomElement rectangleToGMLEnvelope(
QgsRectangle *env, QDomDocument &doc,
int precision = 17 );
133 static QDomElement rectangleToGMLEnvelope(
QgsRectangle *env, QDomDocument &doc,
134 const QString &srsName,
135 bool invertAxisOrientation,
136 int precision = 17 );
140 static QColor colorFromOgcFill(
const QDomElement &fillElement );
143 static QgsExpression *expressionFromOgcFilter(
const QDomElement &element )
SIP_FACTORY;
151 static QDomElement expressionToOgcFilter(
const QgsExpression &exp, QDomDocument &doc, QString *errorMessage =
nullptr );
171 static QDomElement expressionToOgcFilter(
const QgsExpression &exp,
175 const QString &geometryName,
176 const QString &srsName,
177 bool honourAxisOrientation,
178 bool invertAxisOrientation,
179 QString *errorMessage =
nullptr )
SIP_SKIP;
186 static QDomElement expressionToOgcExpression( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage =
nullptr );
193 static QDomElement expressionToOgcExpression( const QgsExpression &exp,
197 const QString &geometryName,
198 const QString &srsName,
199 bool honourAxisOrientation,
200 bool invertAxisOrientation,
201 QString *errorMessage =
nullptr );
244 static QDomElement SQLStatementToOgcFilter(
const QgsSQLStatement &statement,
248 const QList<LayerProperties> &layerProperties,
249 bool honourAxisOrientation,
250 bool invertAxisOrientation,
251 const QMap< QString, QString> &mapUnprefixedTypenameToPrefixedTypename,
252 QString *errorMessage =
nullptr )
SIP_SKIP;
257 static
QgsGeometry geometryFromGMLPoint( const QDomElement &geometryElement );
259 static
QgsGeometry geometryFromGMLLineString( const QDomElement &geometryElement );
261 static
QgsGeometry geometryFromGMLPolygon( const QDomElement &geometryElement );
263 static
QgsGeometry geometryFromGMLMultiPoint( const QDomElement &geometryElement );
265 static
QgsGeometry geometryFromGMLMultiLineString( const QDomElement &geometryElement );
267 static
QgsGeometry geometryFromGMLMultiPolygon( const QDomElement &geometryElement );
274 static
bool readGMLCoordinates(
QgsPolylineXY &coords, const QDomElement &elem );
283 static
bool readGMLPositions(
QgsPolylineXY &coords, const QDomElement &elem );
291 static QDomElement createGMLCoordinates( const
QgsPolylineXY &points, QDomDocument &doc );
298 static QDomElement createGMLPositions( const
QgsPolylineXY &points, QDomDocument &doc );
301 static QgsExpressionNode *nodeFromOgcFilter( QDomElement &element, QString &errorMessage );
303 static QgsExpressionNodeBinaryOperator *nodeBinaryOperatorFromOgcFilter( QDomElement &element, QString &errorMessage );
305 static QgsExpressionNodeFunction *nodeSpatialOperatorFromOgcFilter( QDomElement &element, QString &errorMessage );
307 static QgsExpressionNodeUnaryOperator *nodeNotFromOgcFilter( QDomElement &element, QString &errorMessage );
309 static QgsExpressionNodeFunction *nodeFunctionFromOgcFilter( QDomElement &element, QString &errorMessage );
311 static QgsExpressionNode *nodeLiteralFromOgcFilter( QDomElement &element, QString &errorMessage );
313 static QgsExpressionNodeColumnRef *nodeColumnRefFromOgcFilter( QDomElement &element, QString &errorMessage );
315 static QgsExpressionNode *nodeIsBetweenFromOgcFilter( QDomElement &element, QString &errorMessage );
317 static QgsExpressionNodeBinaryOperator *nodePropertyIsNullFromOgcFilter( QDomElement &element, QString &errorMessage );
334 const QString &geometryName,
335 const QString &srsName,
336 bool honourAxisOrientation,
337 bool invertAxisOrientation );
340 QDomElement expressionNodeToOgcFilter(
const QgsExpressionNode *node );
353 const QString &mGeometryName;
354 const QString &mSrsName;
355 bool mInvertAxisOrientation;
356 QString mErrorMessage;
357 QString mFilterPrefix;
358 QString mPropertyName;
361 QDomElement expressionUnaryOperatorToOgcFilter(
const QgsExpressionNodeUnaryOperator *node );
362 QDomElement expressionBinaryOperatorToOgcFilter(
const QgsExpressionNodeBinaryOperator *node );
363 QDomElement expressionLiteralToOgcFilter(
const QgsExpressionNodeLiteral *node );
364 QDomElement expressionColumnRefToOgcFilter(
const QgsExpressionNodeColumnRef *node );
365 QDomElement expressionInOperatorToOgcFilter(
const QgsExpressionNodeInOperator *node );
366 QDomElement expressionFunctionToOgcFilter(
const QgsExpressionNodeFunction *node );
381 const QList<QgsOgcUtils::LayerProperties> &layerProperties,
382 bool honourAxisOrientation,
383 bool invertAxisOrientation,
384 const QMap< QString, QString> &mapUnprefixedTypenameToPrefixedTypename );
400 const QList<QgsOgcUtils::LayerProperties> &mLayerProperties;
401 bool mHonourAxisOrientation;
402 bool mInvertAxisOrientation;
403 QString mErrorMessage;
404 QString mFilterPrefix;
405 QString mPropertyName;
407 QString mCurrentSRSName;
408 QMap<QString, QString> mMapTableAliasToNames;
409 const QMap< QString, QString> &mMapUnprefixedTypenameToPrefixedTypename;
424 QList<QgsSQLStatement::Node *> args,
425 bool lastArgIsSRSName,
427 bool &axisInversion );
429 #endif // #ifndef SIP_RUN 431 #endif // QGSOGCUTILS_H A rectangle specified with double values.
Internal use by QgsOgcUtils.
Function with a name and arguments node.
A class to represent a 2D point.
QString errorMessage() const
Return the error message.
bool GMLNamespaceUsed() const
Return whether the gml: namespace is used.
A geometry is the spatial representation of a feature.
Binary logical/arithmetical operator (AND, OR, =, +, ...)
bool GMLNamespaceUsed() const
Return whether the gml: namespace is used.
Class for parsing SQL statements.
Literal value (integer, integer64, double, string)
QString errorMessage() const
Return the error message.
Internal use by QgsOgcUtils.
Unary logicial/arithmetical operator ( NOT, - )
QString mSRSName
SRS name.
FilterVersion
OGC filter version.
'X BETWEEN y and z' operator
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
QString mGeometryAttribute
Geometry attribute name.
'x IN (y, z)' operator
The QgsOgcUtils class provides various utility functions for conversion between OGC (Open Geospatial ...