2017-05-14 09:48:41 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsogcutils.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 00:30:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
class QgsOgcUtils
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
The QgsOgcUtils class provides various utility functions for conversion between
|
2017-12-15 10:36:55 -04:00
|
|
|
OGC (Open Geospatial Consortium) standards and QGIS internal representations.
|
2017-05-14 09:48:41 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Currently supported standards:
|
|
|
|
- GML2 - Geography Markup Language (import, export)
|
2013-03-08 00:30:21 +01:00
|
|
|
%End
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsogcutils.h"
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
public:
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
enum GMLVersion
|
|
|
|
{
|
|
|
|
GML_2_1_2,
|
|
|
|
GML_3_1_0,
|
|
|
|
GML_3_2_1,
|
|
|
|
};
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsGeometry geometryFromGML( const QString &xmlString );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Static method that creates geometry from GML
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param xmlString: xml representation of the geometry. GML elements are expected to be
|
2018-05-24 21:21:14 +10:00
|
|
|
in default namespace (\verbatim {<Point>...</Point> \endverbatim) or in
|
|
|
|
"gml" namespace (\verbatim <gml:Point>...</gml:Point> \endverbatim)
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsGeometry geometryFromGML( const QDomNode &geometryNode );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Static method that creates geometry from GML
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsRectangle rectangleFromGMLBox( const QDomNode &boxNode );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Read rectangle from GML2 Box
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsRectangle rectangleFromGMLEnvelope( const QDomNode &envelopeNode );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Read rectangle from GML3 Envelope
|
|
|
|
%End
|
|
|
|
|
2017-06-03 09:46:50 +02:00
|
|
|
static QDomElement geometryToGML( const QgsGeometry &geometry, QDomDocument &doc,
|
2017-05-14 09:48:41 +02:00
|
|
|
QgsOgcUtils::GMLVersion gmlVersion,
|
|
|
|
const QString &srsName,
|
|
|
|
bool invertAxisOrientation,
|
|
|
|
const QString &gmlIdBase,
|
|
|
|
int precision = 17 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the geometry to GML
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-06-03 09:46:50 +02:00
|
|
|
static QDomElement geometryToGML( const QgsGeometry &geometry, QDomDocument &doc, const QString &format, int precision = 17 );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the geometry to GML2 or GML3
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-06-03 09:46:50 +02:00
|
|
|
static QDomElement geometryToGML( const QgsGeometry &geometry, QDomDocument &doc, int precision = 17 );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the geometry to GML2
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QDomElement rectangleToGMLBox( QgsRectangle *box, QDomDocument &doc, int precision = 17 );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the rectangle to GML2 Box
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QDomElement rectangleToGMLBox( QgsRectangle *box, QDomDocument &doc,
|
|
|
|
const QString &srsName,
|
|
|
|
bool invertAxisOrientation,
|
|
|
|
int precision = 17 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the rectangle to GML2 Box
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QDomElement rectangleToGMLEnvelope( QgsRectangle *env, QDomDocument &doc, int precision = 17 );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the rectangle to GML3 Envelope
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QDomElement rectangleToGMLEnvelope( QgsRectangle *env, QDomDocument &doc,
|
|
|
|
const QString &srsName,
|
|
|
|
bool invertAxisOrientation,
|
|
|
|
int precision = 17 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Exports the rectangle to GML3 Envelope
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
:return: QDomElement
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QColor colorFromOgcFill( const QDomElement &fillElement );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Parse XML with OGC fill into QColor
|
|
|
|
%End
|
2014-01-27 09:22:24 +01:00
|
|
|
|
2018-05-25 16:52:48 +02:00
|
|
|
static QgsExpression *expressionFromOgcFilter( const QDomElement &element, QgsVectorLayer *layer = 0 ) /Factory/;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Parse XML with OGC filter into QGIS expression
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QDomElement expressionToOgcFilter( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage = 0 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Creates OGC filter XML element. Supports minimum standard filter
|
|
|
|
according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
|
|
|
|
|
|
|
|
:return: valid \verbatim <Filter> \endverbatim QDomElement on success,
|
2018-05-24 21:21:14 +10:00
|
|
|
otherwise null QDomElement
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
enum FilterVersion
|
|
|
|
{
|
|
|
|
FILTER_OGC_1_0,
|
|
|
|
FILTER_OGC_1_1,
|
|
|
|
FILTER_FES_2_0
|
|
|
|
};
|
|
|
|
|
2018-09-11 09:47:38 +01:00
|
|
|
static QgsExpression *expressionFromOgcFilter( const QDomElement &element, FilterVersion version, QgsVectorLayer *layer = 0 ) /Factory/;
|
2018-09-11 10:06:28 +01:00
|
|
|
%Docstring
|
|
|
|
Returns an expression from a WFS filter embedded in a document.
|
|
|
|
|
|
|
|
:param element: The WFS Filter
|
|
|
|
:param version: The WFS version
|
|
|
|
:param layer: Layer to use to retrieve field values from literal filters
|
|
|
|
|
|
|
|
.. versionadded:: 3.4
|
|
|
|
%End
|
2018-09-11 09:47:38 +01:00
|
|
|
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-02 07:21:20 +02:00
|
|
|
static QDomElement expressionToOgcExpression( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage = 0 );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Creates an OGC expression XML element.
|
|
|
|
|
|
|
|
:return: valid OGC expression QDomElement on success,
|
2018-05-24 21:21:14 +10:00
|
|
|
otherwise null QDomElement
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
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 = 0 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Creates an OGC expression XML element.
|
|
|
|
|
|
|
|
:return: valid OGC expression QDomElement on success,
|
2018-05-24 21:21:14 +10:00
|
|
|
otherwise null QDomElement
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
|
2016-08-07 14:56:10 +02:00
|
|
|
|
2013-03-08 00:30:21 +01:00
|
|
|
};
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsogcutils.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|