QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
This class builds features from GML data in a streaming way. More...
#include <qgsgml.h>
Classes | |
class | LayerProperties |
Layer properties. More... | |
Public Types | |
enum | AxisOrientationLogic { Honour_EPSG_if_urn , Honour_EPSG , Ignore_EPSG } |
Axis orientation logic. More... | |
typedef QPair< QgsFeature *, QString > | QgsGmlFeaturePtrGmlIdPair |
Public Member Functions | |
QgsGmlStreamingParser (const QgsGmlStreamingParser &other)=delete | |
QgsGmlStreamingParser cannot be copied. | |
QgsGmlStreamingParser (const QList< LayerProperties > &layerProperties, const QgsFields &fields, const QMap< QString, QPair< QString, QString > > &mapFieldNameToSrcLayerNameFieldName, AxisOrientationLogic axisOrientationLogic=Honour_EPSG_if_urn, bool invertAxisOrientation=false) | |
Constructor for a join layer, or dealing with renamed fields. | |
QgsGmlStreamingParser (const QString &typeName, const QString &geometryAttribute, const QgsFields &fields, AxisOrientationLogic axisOrientationLogic=Honour_EPSG_if_urn, bool invertAxisOrientation=false) | |
Constructor. | |
~QgsGmlStreamingParser () | |
QString | exceptionText () const |
Returns the exception text. | |
QVector< QgsGmlFeaturePtrGmlIdPair > | getAndStealReadyFeatures () |
Returns the list of features that have been completely parsed. | |
int | getEPSGCode () const |
Returns the EPSG code, or 0 if unknown. | |
bool | isException () const |
Returns whether the document parser is a OGC exception. | |
bool | isTruncatedResponse () const |
Returns whether a "truncatedResponse" element is found. | |
const QgsRectangle & | layerExtent () const |
Returns layer bounding box. | |
int | numberMatched () const |
Returns WFS 2.0 "numberMatched" attribute, or -1 if invalid/not found. | |
int | numberReturned () const |
Returns WFS 2.0 "numberReturned" or WFS 1.1 "numberOfFeatures" attribute, or -1 if invalid/not found. | |
QgsGmlStreamingParser & | operator= (const QgsGmlStreamingParser &other)=delete |
QgsGmlStreamingParser cannot be copied. | |
bool | processData (const QByteArray &data, bool atEnd) |
Process a new chunk of data. | |
bool | processData (const QByteArray &data, bool atEnd, QString &errorMsg) |
Process a new chunk of data. | |
QString | srsName () const |
Returns the value of the srsName attribute. | |
Qgis::WkbType | wkbType () const |
Returns the geometry type. | |
This class builds features from GML data in a streaming way.
The caller must call processData() as soon it has new content from the source. At any point, it can call getAndStealReadyFeatures() to collect the features that have been completely parsed.
typedef QPair<QgsFeature *, QString> QgsGmlStreamingParser::QgsGmlFeaturePtrGmlIdPair |
QgsGmlStreamingParser::QgsGmlStreamingParser | ( | const QString & | typeName, |
const QString & | geometryAttribute, | ||
const QgsFields & | fields, | ||
AxisOrientationLogic | axisOrientationLogic = Honour_EPSG_if_urn , |
||
bool | invertAxisOrientation = false |
||
) |
Constructor.
Definition at line 278 of file qgsgml.cpp.
QgsGmlStreamingParser::QgsGmlStreamingParser | ( | const QList< LayerProperties > & | layerProperties, |
const QgsFields & | fields, | ||
const QMap< QString, QPair< QString, QString > > & | mapFieldNameToSrcLayerNameFieldName, | ||
AxisOrientationLogic | axisOrientationLogic = Honour_EPSG_if_urn , |
||
bool | invertAxisOrientation = false |
||
) |
Constructor for a join layer, or dealing with renamed fields.
Definition at line 340 of file qgsgml.cpp.
QgsGmlStreamingParser::~QgsGmlStreamingParser | ( | ) |
Definition at line 419 of file qgsgml.cpp.
|
delete |
QgsGmlStreamingParser cannot be copied.
|
inline |
QVector< QgsGmlStreamingParser::QgsGmlFeaturePtrGmlIdPair > QgsGmlStreamingParser::getAndStealReadyFeatures | ( | ) |
Returns the list of features that have been completely parsed.
This can be called at any point. This will empty the list maintained internally by the parser, so that features already returned will no longer be returned by later calls.
Definition at line 489 of file qgsgml.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
delete |
QgsGmlStreamingParser cannot be copied.
bool QgsGmlStreamingParser::processData | ( | const QByteArray & | data, |
bool | atEnd | ||
) |
Process a new chunk of data.
atEnd must be set to true
when this is the last chunk of data.
Definition at line 433 of file qgsgml.cpp.
bool QgsGmlStreamingParser::processData | ( | const QByteArray & | data, |
bool | atEnd, | ||
QString & | errorMsg | ||
) |
Process a new chunk of data.
atEnd must be set to true
when this is the last chunk of data.
Definition at line 444 of file qgsgml.cpp.
|
inline |
|
inline |