| QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
    | 
The QgsOgcUtils class provides various utility functions for conversion between OGC (Open Geospatial Consortium) standards and QGIS internal representations. More...
#include <qgsogcutils.h>
| Classes | |
| struct | Context | 
| The Context struct stores the current layer and coordinate transform context.  More... | |
| class | LayerProperties | 
| Layer properties.  More... | |
| Public Types | |
| enum | FilterVersion { FILTER_OGC_1_0 , FILTER_OGC_1_1 , FILTER_FES_2_0 } | 
| OGC filter version.  More... | |
| enum | GMLVersion { GML_2_1_2 , GML_3_1_0 , GML_3_2_1 } | 
| GML version.  More... | |
| Static Public Member Functions | |
| static QColor | colorFromOgcFill (const QDomElement &fillElement) | 
| Parse XML with OGC fill into QColor.  More... | |
| static QDomElement | elseFilterExpression (QDomDocument &doc) | 
| Creates an ElseFilter from doc.  More... | |
| static QgsExpression * | expressionFromOgcFilter (const QDomElement &element, FilterVersion version, QgsVectorLayer *layer=nullptr) | 
| Returns an expression from a WFS filter embedded in a document.  More... | |
| static QgsExpression * | expressionFromOgcFilter (const QDomElement &element, QgsVectorLayer *layer=nullptr) | 
| Parse XML with OGC filter into QGIS expression.  More... | |
| static QDomElement | expressionToOgcExpression (const QgsExpression &exp, QDomDocument &doc, QgsOgcUtils::GMLVersion gmlVersion, FilterVersion filterVersion, const QString &geometryName, const QString &srsName, bool honourAxisOrientation, bool invertAxisOrientation, QString *errorMessage=nullptr, bool requiresFilterElement=false) | 
| Creates an OGC expression XML element from the exp expression.  More... | |
| static QDomElement | expressionToOgcExpression (const QgsExpression &exp, QDomDocument &doc, QString *errorMessage=nullptr, bool requiresFilterElement=false) | 
| Creates an OGC expression XML element from the exp expression with default values for the geometry name, srs name, honourAsisOrientation and invertAxisOrientation.  More... | |
| static QDomElement | expressionToOgcFilter (const QgsExpression &exp, QDomDocument &doc, QgsOgcUtils::GMLVersion gmlVersion, FilterVersion filterVersion, const QString &namespacePrefix, const QString &namespaceURI, const QString &geometryName, const QString &srsName, bool honourAxisOrientation, bool invertAxisOrientation, QString *errorMessage=nullptr) | 
| Creates OGC filter XML element.  More... | |
| static QDomElement | expressionToOgcFilter (const QgsExpression &exp, QDomDocument &doc, QString *errorMessage=nullptr) | 
| Creates OGC filter XML element.  More... | |
| static QgsGeometry | geometryFromGML (const QDomNode &geometryNode, const QgsOgcUtils::Context &context=QgsOgcUtils::Context()) | 
| Static method that creates geometry from GML.  More... | |
| static QgsGeometry | geometryFromGML (const QString &xmlString, const QgsOgcUtils::Context &context=QgsOgcUtils::Context()) | 
| Static method that creates geometry from GML.  More... | |
| static QDomElement | geometryToGML (const QgsGeometry &geometry, QDomDocument &doc, const QString &format, int precision=17) | 
| Exports the geometry to GML2 or GML3.  More... | |
| static QDomElement | geometryToGML (const QgsGeometry &geometry, QDomDocument &doc, int precision=17) | 
| Exports the geometry to GML2.  More... | |
| static QDomElement | geometryToGML (const QgsGeometry &geometry, QDomDocument &doc, QgsOgcUtils::GMLVersion gmlVersion, const QString &srsName, bool invertAxisOrientation, const QString &gmlIdBase, int precision=17) | 
| Exports the geometry to GML.  More... | |
| static QgsRectangle | rectangleFromGMLBox (const QDomNode &boxNode) | 
| Read rectangle from GML2 Box.  More... | |
| static QgsRectangle | rectangleFromGMLEnvelope (const QDomNode &envelopeNode) | 
| Read rectangle from GML3 Envelope.  More... | |
| static QDomElement | rectangleToGMLBox (QgsRectangle *box, QDomDocument &doc, const QString &srsName, bool invertAxisOrientation, int precision=17) | 
| Exports the rectangle to GML2 Box.  More... | |
| static QDomElement | rectangleToGMLBox (QgsRectangle *box, QDomDocument &doc, int precision=17) | 
| Exports the rectangle to GML2 Box.  More... | |
| static QDomElement | rectangleToGMLEnvelope (QgsRectangle *env, QDomDocument &doc, const QString &srsName, bool invertAxisOrientation, int precision=17) | 
| Exports the rectangle to GML3 Envelope.  More... | |
| static QDomElement | rectangleToGMLEnvelope (QgsRectangle *env, QDomDocument &doc, int precision=17) | 
| Exports the rectangle to GML3 Envelope.  More... | |
| 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) | 
| Creates OGC filter XML element from the WHERE and JOIN clauses of a SQL statement.  More... | |
The QgsOgcUtils class provides various utility functions for conversion between OGC (Open Geospatial Consortium) standards and QGIS internal representations.
Currently supported standards:
Definition at line 51 of file qgsogcutils.h.
OGC filter version.
| Enumerator | |
|---|---|
| FILTER_OGC_1_0 | |
| FILTER_OGC_1_1 | |
| FILTER_FES_2_0 | |
Definition at line 178 of file qgsogcutils.h.
| 
 | static | 
Parse XML with OGC fill into QColor.
Definition at line 1656 of file qgsogcutils.cpp.
| 
 | static | 
Creates an ElseFilter from doc.
Definition at line 1892 of file qgsogcutils.cpp.
| 
 | static | 
Returns an expression from a WFS filter embedded in a document.
| element | The WFS Filter | 
| version | The WFS version | 
| layer | Layer to use to retrieve field values from literal filters | 
Definition at line 1700 of file qgsogcutils.cpp.
| 
 | static | 
Parse XML with OGC filter into QGIS expression.
Definition at line 1695 of file qgsogcutils.cpp.
| 
 | static | 
Creates an OGC expression XML element from the exp expression.
<Filter>QDomElement when requiresFilterElement is set. otherwise null QDomElement
Definition at line 1937 of file qgsogcutils.cpp.
| 
 | static | 
Creates an OGC expression XML element from the exp expression with default values for the geometry name, srs name, honourAsisOrientation and invertAxisOrientation.
<Filter>QDomElement when requiresFilterElement is set. otherwise null QDomElement
Definition at line 1886 of file qgsogcutils.cpp.
| 
 | static | 
Creates OGC filter XML element.
Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
<Filter>QDomElement on success, otherwise null QDomElement
Definition at line 1898 of file qgsogcutils.cpp.
| 
 | static | 
Creates OGC filter XML element.
Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
<Filter>QDomElement on success, otherwise null QDomElement
Definition at line 1880 of file qgsogcutils.cpp.
| 
 | static | 
Static method that creates geometry from GML.
Definition at line 83 of file qgsogcutils.cpp.
| 
 | static | 
Static method that creates geometry from GML.
| xmlString | xml representation of the geometry. GML elements are expected to be in default namespace ( {<Point>...</Point> ) or in "gml" namespace (<gml:Point>...</gml:Point>) | 
| context | QgsOgcUtils context | 
Definition at line 193 of file qgsogcutils.cpp.
| 
 | static | 
Exports the geometry to GML2 or GML3.
Definition at line 1217 of file qgsogcutils.cpp.
| 
 | static | 
| 
 | static | 
Exports the geometry to GML.
Definition at line 1222 of file qgsogcutils.cpp.
| 
 | static | 
Read rectangle from GML2 Box.
Definition at line 972 of file qgsogcutils.cpp.
| 
 | static | 
Read rectangle from GML3 Envelope.
Definition at line 1057 of file qgsogcutils.cpp.
| 
 | static | 
Exports the rectangle to GML2 Box.
Definition at line 1141 of file qgsogcutils.cpp.
| 
 | static | 
Exports the rectangle to GML2 Box.
Definition at line 1136 of file qgsogcutils.cpp.
| 
 | static | 
Exports the rectangle to GML3 Envelope.
Definition at line 1181 of file qgsogcutils.cpp.
| 
 | static | 
Exports the rectangle to GML3 Envelope.
Definition at line 1176 of file qgsogcutils.cpp.
| 
 | static | 
Creates OGC filter XML element from the WHERE and JOIN clauses of a SQL statement.
Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT,LIKE,BETWEEN,IN) Supports layer joins. Supports ST_GeometryFromText(wkt[, srid/srsname]), ST_MakeEnvelope(xmin,ymin,xmax,ymax[, srid/srsname]) ST_GeomFromGML(serialized_gml_string) BBOX() ST_Intersects(), ST_Contains(), ST_Crosses(), ST_Equals(), ST_Disjoint(), ST_Overlaps(), ST_Touches(), ST_Within() ST_DWithin(), ST_Beyond() custom functions
<Filter>QDomElement on success, otherwise null QDomElement
Definition at line 1992 of file qgsogcutils.cpp.