QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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)
 Also emit signal with progress and totalSteps together (this is better for the status message) More...
 
void dataReadProgress (int progress)
 
void totalStepsUpdate (int totalSteps)
 

Public Member Functions

 QgsGml (const QString &typeName, const QString &geometryAttribute, const QgsFields &fields)
 
QgsCoordinateReferenceSystem crs () const
 Returns features spatial reference system. More...
 
QMap< QgsFeatureId, QgsFeature * > featuresMap () const
 Gets parsed features for given type name. More...
 
int getFeatures (const QByteArray &data, QgsWkbTypes::Type *wkbType, QgsRectangle *extent=nullptr)
 Read from GML data. More...
 
int getFeatures (const QString &uri, QgsWkbTypes::Type *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. More...
 
QMap< QgsFeatureId, QString > idsMap () const
 Gets feature ids map. More...
 

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 366 of file qgsgml.h.

Constructor & Destructor Documentation

◆ QgsGml()

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

Definition at line 46 of file qgsgml.cpp.

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsGml::crs ( ) const

Returns features spatial reference system.

Since
QGIS 2.1

Definition at line 264 of file qgsgml.cpp.

◆ dataProgressAndSteps

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

Also emit signal with progress and totalSteps together (this is better for the status message)

◆ dataReadProgress

void QgsGml::dataReadProgress ( int  progress)
signal

◆ featuresMap()

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

Gets parsed features for given type name.

Definition at line 399 of file qgsgml.h.

◆ getFeatures() [1/2]

int QgsGml::getFeatures ( const QByteArray &  data,
QgsWkbTypes::Type wkbType,
QgsRectangle extent = nullptr 
)

Read from GML data.

Constructor uri param is ignored

Definition at line 179 of file qgsgml.cpp.

◆ getFeatures() [2/2]

int QgsGml::getFeatures ( const QString &  uri,
QgsWkbTypes::Type 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 61 of file qgsgml.cpp.

◆ idsMap()

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

Gets feature ids map.

Definition at line 402 of file qgsgml.h.

◆ totalStepsUpdate

void QgsGml::totalStepsUpdate ( int  totalSteps)
signal

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