2013-03-08 00:30:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
class QgsOgcUtils
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsogcutils.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2013-03-13 19:06:42 +01:00
|
|
|
/** static method that creates geometry from GML
|
2013-03-08 00:30:21 +01:00
|
|
|
@param XML representation of the geometry. GML elements are expected to be
|
|
|
|
in default namespace (<Point>...</Point>) or in "gml" namespace (<gml:Point>...</gml:Point>)
|
|
|
|
@note added in 1.9
|
|
|
|
*/
|
2013-03-13 19:06:42 +01:00
|
|
|
static QgsGeometry* geometryFromGML( const QString& xmlString ) /Factory/;
|
2013-03-08 00:30:21 +01:00
|
|
|
|
2013-03-13 19:06:42 +01:00
|
|
|
/** static method that creates geometry from GML
|
2013-03-08 00:30:21 +01:00
|
|
|
@note added in 1.9
|
|
|
|
*/
|
2013-03-13 19:06:42 +01:00
|
|
|
static QgsGeometry* geometryFromGML( const QDomNode& geometryNode ) /Factory/;
|
2013-03-08 00:30:21 +01:00
|
|
|
|
|
|
|
/** read rectangle from GML2 Box */
|
|
|
|
static QgsRectangle rectangleFromGMLBox( const QDomNode& boxNode );
|
|
|
|
|
2013-03-13 19:06:42 +01:00
|
|
|
/** read rectangle from GML3 Envelope */
|
|
|
|
static QgsRectangle rectangleFromGMLEnvelope( const QDomNode& envelopeNode );
|
2013-03-12 18:43:39 +01:00
|
|
|
|
2013-03-13 19:06:42 +01:00
|
|
|
/** Exports the geometry to GML2
|
|
|
|
@return QDomElement
|
2013-03-12 18:43:39 +01:00
|
|
|
*/
|
2013-03-13 19:06:42 +01:00
|
|
|
static QDomElement geometryToGML( QgsGeometry* geometry, QDomDocument& doc );
|
2013-03-12 18:43:39 +01:00
|
|
|
|
2013-03-13 19:06:42 +01:00
|
|
|
/** Exports the geometry to GML2 or GML3
|
|
|
|
@return QDomElement
|
2013-03-12 18:43:39 +01:00
|
|
|
*/
|
2013-03-13 19:06:42 +01:00
|
|
|
static QDomElement geometryToGML( QgsGeometry* geometry, QDomDocument& doc, QString Format );
|
2013-03-13 00:39:54 +01:00
|
|
|
|
|
|
|
/** Exports the rectangle to GML2 Box
|
|
|
|
@return QDomElement
|
|
|
|
*/
|
|
|
|
static QDomElement rectangleToGMLBox( QgsRectangle* box, QDomDocument& doc );
|
|
|
|
|
|
|
|
/** Exports the rectangle to GML2 Envelope
|
|
|
|
@return QDomElement
|
|
|
|
*/
|
|
|
|
static QDomElement rectangleToGMLEnvelope( QgsRectangle* env, QDomDocument& doc );
|
|
|
|
|
|
|
|
|
|
|
|
/** Parse XML with OGC filter into QGIS expression */
|
|
|
|
static QgsExpression* expressionFromOgcFilter( const QDomElement& element ) /Factory/;
|
|
|
|
|
2013-03-13 23:03:10 +01:00
|
|
|
/** Creates OGC filter XML element. Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
|
|
|
|
@return valid <Filter> QDomElement on success, otherwise null QDomElement
|
|
|
|
*/
|
2013-03-15 00:43:07 +01:00
|
|
|
static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage /Out/ );
|
2013-03-13 23:03:10 +01:00
|
|
|
|
2013-03-08 00:30:21 +01:00
|
|
|
};
|
|
|
|
|