QGIS API Documentation
2.0.1-Dufour
|
The QgsOgcUtils class provides various utility functions for conversion between OGC (Open Geospatial Consortium) standards and QGIS internal representations. More...
#include <qgsogcutils.h>
Static Public Member Functions | |
static QgsGeometry * | geometryFromGML (const QString &xmlString) |
static method that creates geometry from GML | |
static QgsGeometry * | geometryFromGML (const QDomNode &geometryNode) |
static method that creates geometry from GML | |
static QgsRectangle | rectangleFromGMLBox (const QDomNode &boxNode) |
read rectangle from GML2 Box | |
static QgsRectangle | rectangleFromGMLEnvelope (const QDomNode &envelopeNode) |
read rectangle from GML3 Envelope | |
static QDomElement | geometryToGML (QgsGeometry *geometry, QDomDocument &doc, QString format) |
Exports the geometry to GML2 or GML3. | |
static QDomElement | geometryToGML (QgsGeometry *geometry, QDomDocument &doc) |
Exports the geometry to GML2. | |
static QDomElement | rectangleToGMLBox (QgsRectangle *box, QDomDocument &doc) |
Exports the rectangle to GML2 Box. | |
static QDomElement | rectangleToGMLEnvelope (QgsRectangle *env, QDomDocument &doc) |
Exports the rectangle to GML2 Envelope. | |
static QgsExpression * | expressionFromOgcFilter (const QDomElement &element) |
Parse XML with OGC filter into QGIS expression. | |
static QDomElement | expressionToOgcFilter (const QgsExpression &exp, QDomDocument &doc, QString *errorMessage=0) |
Creates OGC filter XML element. |
Static Private Member Functions | |
static QgsGeometry * | geometryFromGMLPoint (const QDomElement &geometryElement) |
static method that creates geometry from GML Point | |
static QgsGeometry * | geometryFromGMLLineString (const QDomElement &geometryElement) |
static method that creates geometry from GML LineString | |
static QgsGeometry * | geometryFromGMLPolygon (const QDomElement &geometryElement) |
static method that creates geometry from GML Polygon | |
static QgsGeometry * | geometryFromGMLMultiPoint (const QDomElement &geometryElement) |
static method that creates geometry from GML MultiPoint | |
static QgsGeometry * | geometryFromGMLMultiLineString (const QDomElement &geometryElement) |
static method that creates geometry from GML MultiLineString | |
static QgsGeometry * | geometryFromGMLMultiPolygon (const QDomElement &geometryElement) |
static method that creates geometry from GML MultiPolygon | |
static bool | readGMLCoordinates (QgsPolyline &coords, const QDomElement elem) |
Reads the. | |
static bool | readGMLPositions (QgsPolyline &coords, const QDomElement elem) |
Reads the. | |
static QDomElement | createGMLCoordinates (const QgsPolyline &points, QDomDocument &doc) |
Create a GML coordinates element from a point list. | |
static QDomElement | createGMLPositions (const QgsPolyline &points, QDomDocument &doc) |
Create a GML pos or posList element from a point list. | |
static QgsExpression::Node * | nodeFromOgcFilter (QDomElement &element, QString &errorMessage) |
handle a generic sub-expression | |
static QgsExpression::NodeBinaryOperator * | nodeBinaryOperatorFromOgcFilter (QDomElement &element, QString &errorMessage) |
handle a generic binary operator | |
static QgsExpression::NodeFunction * | nodeSpatialOperatorFromOgcFilter (QDomElement &element, QString &errorMessage) |
handles various spatial operation tags ( | |
static QgsExpression::NodeUnaryOperator * | nodeNotFromOgcFilter (QDomElement &element, QString &errorMessage) |
handle | |
static QgsExpression::NodeFunction * | nodeFunctionFromOgcFilter (QDomElement &element, QString &errorMessage) |
handles | |
static QgsExpression::Node * | nodeLiteralFromOgcFilter (QDomElement &element, QString &errorMessage) |
handles | |
static QgsExpression::NodeColumnRef * | nodeColumnRefFromOgcFilter (QDomElement &element, QString &errorMessage) |
handles | |
static QgsExpression::Node * | nodeIsBetweenFromOgcFilter (QDomElement &element, QString &errorMessage) |
handles | |
static QgsExpression::NodeBinaryOperator * | nodePropertyIsNullFromOgcFilter (QDomElement &element, QString &errorMessage) |
handles | |
static QDomElement | expressionNodeToOgcFilter (const QgsExpression::Node *node, QDomDocument &doc, QString &errorMessage) |
static QDomElement | expressionUnaryOperatorToOgcFilter (const QgsExpression::NodeUnaryOperator *node, QDomDocument &doc, QString &errorMessage) |
static QDomElement | expressionBinaryOperatorToOgcFilter (const QgsExpression::NodeBinaryOperator *node, QDomDocument &doc, QString &errorMessage) |
static QDomElement | expressionLiteralToOgcFilter (const QgsExpression::NodeLiteral *node, QDomDocument &doc, QString &errorMessage) |
static QDomElement | expressionColumnRefToOgcFilter (const QgsExpression::NodeColumnRef *node, QDomDocument &doc, QString &errorMessage) |
static QDomElement | expressionInOperatorToOgcFilter (const QgsExpression::NodeInOperator *node, QDomDocument &doc, QString &errorMessage) |
static QDomElement | expressionFunctionToOgcFilter (const QgsExpression::NodeFunction *node, QDomDocument &doc, QString &errorMessage) |
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 29 of file qgsogcutils.h.
|
staticprivate |
Create a GML coordinates element from a point list.
points | list of data points |
doc | the GML document |
Definition at line 1365 of file qgsogcutils.cpp.
References qgsDoubleToString().
|
staticprivate |
Create a GML pos or posList element from a point list.
points | list of data points |
doc | the GML document |
Definition at line 1389 of file qgsogcutils.cpp.
References qgsDoubleToString().
|
staticprivate |
Definition at line 1917 of file qgsogcutils.cpp.
References QgsExpression::BinaryOperatorText, binaryOperatorToTagName(), QgsExpression::boEQ, QgsExpression::boILike, QgsExpression::boIs, QgsExpression::boIsNot, QgsExpression::boLike, QgsExpression::boNE, expressionNodeToOgcFilter(), QgsExpression::Node::nodeType(), QgsExpression::ntLiteral, QgsExpression::NodeBinaryOperator::op(), QgsExpression::NodeBinaryOperator::opLeft(), QgsExpression::NodeBinaryOperator::opRight(), and QgsExpression::NodeLiteral::value().
Referenced by expressionNodeToOgcFilter().
|
staticprivate |
Definition at line 2012 of file qgsogcutils.cpp.
References QgsExpression::NodeColumnRef::name().
Referenced by expressionNodeToOgcFilter().
|
static |
Parse XML with OGC filter into QGIS expression.
Definition at line 1419 of file qgsogcutils.cpp.
References QgsExpression::boConcat, QgsExpression::mParserErrorString, QgsExpression::mRootNode, and nodeFromOgcFilter().
Referenced by QgsRuleBasedRendererV2::Rule::createFromSld(), and QgsSymbolLayerV2Utils::functionFromSldElement().
|
staticprivate |
Definition at line 2081 of file qgsogcutils.cpp.
References QgsExpression::NodeFunction::args(), expressionNodeToOgcFilter(), QgsExpression::NodeFunction::fnIndex(), QgsGeometry::fromWkt(), QgsExpression::Functions(), geometryToGML(), isBinarySpatialOperator(), isGeometryColumn(), QgsExpression::NodeList::list(), QgsExpression::Function::name(), QgsExpression::Node::nodeType(), QgsExpression::ntFunction, QgsExpression::ntLiteral, QgsExpression::Function::params(), and tagNameForSpatialOperator().
Referenced by expressionNodeToOgcFilter().
|
staticprivate |
Definition at line 2021 of file qgsogcutils.cpp.
References expressionNodeToOgcFilter(), QgsExpression::NodeList::list(), QgsExpression::NodeInOperator::list(), and QgsExpression::NodeInOperator::node().
Referenced by expressionNodeToOgcFilter().
|
staticprivate |
Definition at line 1986 of file qgsogcutils.cpp.
References QgsExpression::NodeLiteral::value().
Referenced by expressionNodeToOgcFilter().
|
staticprivate |
Definition at line 1866 of file qgsogcutils.cpp.
References expressionBinaryOperatorToOgcFilter(), expressionColumnRefToOgcFilter(), expressionFunctionToOgcFilter(), expressionInOperatorToOgcFilter(), expressionLiteralToOgcFilter(), expressionUnaryOperatorToOgcFilter(), QgsExpression::Node::nodeType(), QgsExpression::ntBinaryOperator, QgsExpression::ntColumnRef, QgsExpression::ntFunction, QgsExpression::ntInOperator, QgsExpression::ntLiteral, and QgsExpression::ntUnaryOperator.
Referenced by expressionBinaryOperatorToOgcFilter(), expressionFunctionToOgcFilter(), expressionInOperatorToOgcFilter(), expressionToOgcFilter(), and expressionUnaryOperatorToOgcFilter().
|
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 1847 of file qgsogcutils.cpp.
References expressionNodeToOgcFilter(), and QgsExpression::rootNode().
Referenced by QgsSymbolLayerV2Utils::createFunctionElement().
|
staticprivate |
Definition at line 1890 of file qgsogcutils.cpp.
References expressionNodeToOgcFilter(), QgsExpression::NodeUnaryOperator::op(), QgsExpression::NodeUnaryOperator::operand(), QgsExpression::UnaryOperatorText, QgsExpression::uoMinus, and QgsExpression::uoNot.
Referenced by expressionNodeToOgcFilter().
|
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>) |
Definition at line 79 of file qgsogcutils.cpp.
References GML_NAMESPACE.
Referenced by fcnGeomFromGML().
|
static |
static method that creates geometry from GML
Definition at line 18 of file qgsogcutils.cpp.
References QgsGeometry::fromRect(), geometryFromGMLLineString(), geometryFromGMLMultiLineString(), geometryFromGMLMultiPoint(), geometryFromGMLMultiPolygon(), geometryFromGMLPoint(), geometryFromGMLPolygon(), rectangleFromGMLBox(), and rectangleFromGMLEnvelope().
|
staticprivate |
static method that creates geometry from GML LineString
Definition at line 146 of file qgsogcutils.cpp.
References QgsGeometry::fromWkb(), GML_NAMESPACE, readGMLCoordinates(), readGMLPositions(), size, and QGis::WKBLineString.
Referenced by geometryFromGML().
|
staticprivate |
static method that creates geometry from GML MultiLineString
Definition at line 432 of file qgsogcutils.cpp.
References QgsGeometry::fromWkb(), GML_NAMESPACE, readGMLCoordinates(), readGMLPositions(), size, QGis::WKBLineString, and QGis::WKBMultiLineString.
Referenced by geometryFromGML().
|
staticprivate |
static method that creates geometry from GML MultiPoint
Definition at line 334 of file qgsogcutils.cpp.
References QgsGeometry::fromWkb(), GML_NAMESPACE, readGMLCoordinates(), readGMLPositions(), size, QGis::WKBMultiPoint, and QGis::WKBPoint.
Referenced by geometryFromGML().
|
staticprivate |
static method that creates geometry from GML MultiPolygon
Definition at line 578 of file qgsogcutils.cpp.
References QgsGeometry::fromWkb(), GML_NAMESPACE, readGMLCoordinates(), readGMLPositions(), size, QGis::WKBMultiPolygon, and QGis::WKBPolygon.
Referenced by geometryFromGML().
|
staticprivate |
static method that creates geometry from GML Point
Definition at line 91 of file qgsogcutils.cpp.
References QgsGeometry::fromWkb(), GML_NAMESPACE, readGMLCoordinates(), readGMLPositions(), size, and QGis::WKBPoint.
Referenced by geometryFromGML().
|
staticprivate |
static method that creates geometry from GML Polygon
Definition at line 207 of file qgsogcutils.cpp.
References QgsGeometry::fromWkb(), GML_NAMESPACE, readGMLCoordinates(), readGMLPositions(), size, and QGis::WKBPolygon.
Referenced by geometryFromGML().
|
static |
Exports the geometry to GML2 or GML3.
Definition at line 1051 of file qgsogcutils.cpp.
References QgsGeometry::asWkb(), qgsDoubleToString(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and QgsGeometry::wkbType().
Referenced by expressionFunctionToOgcFilter(), and geometryToGML().
|
static |
Exports the geometry to GML2.
Definition at line 1360 of file qgsogcutils.cpp.
References geometryToGML().
|
staticprivate |
handle a generic binary operator
Definition at line 1561 of file qgsogcutils.cpp.
References binaryOperatorFromTagName(), and nodeFromOgcFilter().
Referenced by nodeFromOgcFilter().
|
staticprivate |
handles
<PropertyName>
tag
Definition at line 1756 of file qgsogcutils.cpp.
Referenced by nodeFromOgcFilter().
|
staticprivate |
handle a generic sub-expression
Definition at line 1511 of file qgsogcutils.cpp.
References isBinaryOperator(), isSpatialOperator(), nodeBinaryOperatorFromOgcFilter(), nodeColumnRefFromOgcFilter(), nodeFunctionFromOgcFilter(), nodeIsBetweenFromOgcFilter(), nodeLiteralFromOgcFilter(), nodeNotFromOgcFilter(), nodePropertyIsNullFromOgcFilter(), and nodeSpatialOperatorFromOgcFilter().
Referenced by expressionFromOgcFilter(), nodeBinaryOperatorFromOgcFilter(), nodeFunctionFromOgcFilter(), nodeIsBetweenFromOgcFilter(), nodeLiteralFromOgcFilter(), nodeNotFromOgcFilter(), and nodePropertyIsNullFromOgcFilter().
|
staticprivate |
handles
<Function>
tag
Definition at line 1650 of file qgsogcutils.cpp.
References QgsExpression::NodeList::append(), QgsExpression::Functions(), QgsExpression::Function::name(), and nodeFromOgcFilter().
Referenced by nodeFromOgcFilter().
|
staticprivate |
handles
<PropertyIsBetween>
tag
Definition at line 1768 of file qgsogcutils.cpp.
References QgsExpression::boAnd, QgsExpression::boGE, QgsExpression::boLE, and nodeFromOgcFilter().
Referenced by nodeFromOgcFilter().
|
staticprivate |
handles
<Literal>
tag
Definition at line 1689 of file qgsogcutils.cpp.
References QgsExpression::boConcat, and nodeFromOgcFilter().
Referenced by nodeFromOgcFilter().
|
staticprivate |
handle
<Not>
tag
Definition at line 1632 of file qgsogcutils.cpp.
References nodeFromOgcFilter(), and QgsExpression::uoNot.
Referenced by nodeFromOgcFilter().
|
staticprivate |
handles
<PropertyIsNull>
tag
Definition at line 1824 of file qgsogcutils.cpp.
References QgsExpression::boIs, and nodeFromOgcFilter().
Referenced by nodeFromOgcFilter().
|
staticprivate |
handles various spatial operation tags (
<Intersects>
,
<Touches>
etc.)
Definition at line 1597 of file qgsogcutils.cpp.
References QgsExpression::NodeList::append(), and QgsExpression::functionIndex().
Referenced by nodeFromOgcFilter().
|
staticprivate |
Reads the.
<gml:coordinates>
element and extracts the coordinates as points
coords | list where the found coordinates are appended |
elem | the <gml:coordinates>element |
Definition at line 783 of file qgsogcutils.cpp.
Referenced by geometryFromGMLLineString(), geometryFromGMLMultiLineString(), geometryFromGMLMultiPoint(), geometryFromGMLMultiPolygon(), geometryFromGMLPoint(), and geometryFromGMLPolygon().
|
staticprivate |
Reads the.
<gml:pos>
or
<gml:posList>
and extracts the coordinates as points
coords | list where the found coordinates are appended |
elem | the <gml:pos>or <gml:posList>element |
Definition at line 864 of file qgsogcutils.cpp.
Referenced by geometryFromGMLLineString(), geometryFromGMLMultiLineString(), geometryFromGMLMultiPoint(), geometryFromGMLMultiPolygon(), geometryFromGMLPoint(), and geometryFromGMLPolygon().
|
static |
read rectangle from GML2 Box
Definition at line 828 of file qgsogcutils.cpp.
References QgsRectangle::normalize().
Referenced by geometryFromGML().
|
static |
read rectangle from GML3 Envelope
Definition at line 915 of file qgsogcutils.cpp.
References GML_NAMESPACE, and QgsRectangle::normalize().
Referenced by geometryFromGML().
|
static |
Exports the rectangle to GML2 Box.
Definition at line 994 of file qgsogcutils.cpp.
References qgsDoubleToString(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
|
static |
Exports the rectangle to GML2 Envelope.
Definition at line 1022 of file qgsogcutils.cpp.
References qgsDoubleToString(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().