QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
QgsGml Class Reference

This class reads data from a WFS server or alternatively from a GML file. More...

#include <qgsgml.h>

Inheritance diagram for QgsGml:
Inheritance graph
[legend]

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.
 

Detailed Description

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.

Definition at line 387 of file qgsgml.h.

Constructor & Destructor Documentation

◆ QgsGml()

QgsGml::QgsGml ( const QString &  typeName,
const QString &  geometryAttribute,
const QgsFields fields 
)

Definition at line 54 of file qgsgml.cpp.

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsGml::crs ( ) const

Returns the spatial reference system for features.

Definition at line 272 of file qgsgml.cpp.

◆ dataProgressAndSteps

void QgsGml::dataProgressAndSteps ( int  progress,
int  totalSteps 
)
signal

Emitted when data reading progresses or the total number of bytes to read changes.

Parameters
progressspecifies the number of bytes processed so far
totalStepsspecifies the total number of bytes which must be processed

◆ dataReadProgress

void QgsGml::dataReadProgress ( int  progress)
signal

Emitted when data reading progresses.

Parameters
progressspecifies the number of bytes processed so far

◆ featuresMap()

QMap< QgsFeatureId, QgsFeature * > QgsGml::featuresMap ( ) const
inline

Gets parsed features for given type name.

Definition at line 423 of file qgsgml.h.

◆ getFeatures() [1/2]

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.

◆ getFeatures() [2/2]

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.

Parameters
uriGML URL
wkbTypewkbType to retrieve
extentretrieved extents
userNameusername for authentication
passwordpassword for authentication
authcfgauthentication configuration id
Returns
0 in case of success
Note
available in Python as getFeaturesUri

Definition at line 69 of file qgsgml.cpp.

◆ idsMap()

QMap< QgsFeatureId, QString > QgsGml::idsMap ( ) const
inline

Gets feature ids map.

Definition at line 426 of file qgsgml.h.

◆ totalStepsUpdate

void QgsGml::totalStepsUpdate ( int  totalSteps)
signal

Emitted when the total number of bytes to read changes.

Parameters
totalStepsspecifies the total number of bytes which must be processed

The documentation for this class was generated from the following files: