QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
This class reads data from a WFS server or alternatively from a GML file. More...
#include <qgsgml.h>
Signals | |
void | dataProgressAndSteps (int progress, int totalSteps) |
Emitted when data reading progresses or the total number of bytes to read changes. | |
void | dataReadProgress (int progress) |
Emitted when data reading progresses. | |
void | totalStepsUpdate (int totalSteps) |
Emitted when the total number of bytes to read changes. | |
Public Member Functions | |
QgsGml (const QString &typeName, const QString &geometryAttribute, const QgsFields &fields) | |
QgsCoordinateReferenceSystem | crs () const |
Returns the spatial reference system for features. | |
QMap< QgsFeatureId, QgsFeature * > | featuresMap () const |
Gets parsed features for given type name. | |
int | getFeatures (const QByteArray &data, Qgis::WkbType *wkbType, QgsRectangle *extent=nullptr) |
Read from GML data. | |
int | getFeatures (const QString &uri, Qgis::WkbType *wkbType, QgsRectangle *extent=nullptr, const QString &userName=QString(), const QString &password=QString(), const QString &authcfg=QString()) |
Does the HTTP GET request to the WFS server. | |
QMap< QgsFeatureId, QString > | idsMap () const |
Gets feature ids map. | |
This class reads data from a WFS server or alternatively from a GML file.
It uses the expat XML parser and an event based model to keep performance high. The parsing starts when the first data arrives, it does not wait until the request is finished.
QgsGml::QgsGml | ( | const QString & | typeName, |
const QString & | geometryAttribute, | ||
const QgsFields & | fields | ||
) |
Definition at line 54 of file qgsgml.cpp.
QgsCoordinateReferenceSystem QgsGml::crs | ( | ) | const |
Returns the spatial reference system for features.
Definition at line 272 of file qgsgml.cpp.
|
signal |
Emitted when data reading progresses or the total number of bytes to read changes.
progress | specifies the number of bytes processed so far |
totalSteps | specifies the total number of bytes which must be processed |
|
signal |
Emitted when data reading progresses.
progress | specifies the number of bytes processed so far |
|
inline |
int QgsGml::getFeatures | ( | const QByteArray & | data, |
Qgis::WkbType * | wkbType, | ||
QgsRectangle * | extent = nullptr |
||
) |
Read from GML data.
The constructor uri param is ignored.
Definition at line 187 of file qgsgml.cpp.
int QgsGml::getFeatures | ( | const QString & | uri, |
Qgis::WkbType * | wkbType, | ||
QgsRectangle * | extent = nullptr , |
||
const QString & | userName = QString() , |
||
const QString & | password = QString() , |
||
const QString & | authcfg = QString() |
||
) |
Does the HTTP GET request to the WFS server.
uri | GML URL |
wkbType | wkbType to retrieve |
extent | retrieved extents |
userName | username for authentication |
password | password for authentication |
authcfg | authentication configuration id |
Definition at line 69 of file qgsgml.cpp.
|
inline |
|
signal |
Emitted when the total number of bytes to read changes.
totalSteps | specifies the total number of bytes which must be processed |