QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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)
 
void dataReadProgress (int progress)
 
void totalStepsUpdate (int totalSteps)
 

Public Member Functions

 QgsGml (const QString &typeName, const QString &geometryAttribute, const QgsFields &fields)
 
 ~QgsGml ()
 
QgsCoordinateReferenceSystem crs () const
 Returns features spatial reference system. More...
 
QMap< QgsFeatureId, QgsFeature *> featuresMap () const
 Get parsed features for given type name. More...
 
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 Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. More...
 
int getFeatures (const QByteArray &data, QGis::WkbType *wkbType, QgsRectangle *extent=nullptr)
 Read from GML data. More...
 
QMap< QgsFeatureId, QStringidsMap () const
 Get feature ids map. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual ~QObject ()
 
bool blockSignals (bool block)
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThreadthread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

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

Constructor & Destructor Documentation

◆ QgsGml()

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

Definition at line 43 of file qgsgml.cpp.

◆ ~QgsGml()

QgsGml::~QgsGml ( )

Definition at line 59 of file qgsgml.cpp.

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsGml::crs ( ) const

Returns features spatial reference system.

Note
Added in QGIS 2.1

Definition at line 263 of file qgsgml.cpp.

◆ dataProgressAndSteps

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

◆ dataReadProgress

void QgsGml::dataReadProgress ( int  progress)
signal

◆ featuresMap()

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

Get parsed features for given type name.

Definition at line 364 of file qgsgml.h.

◆ getFeatures() [1/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 Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.

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 63 of file qgsgml.cpp.

◆ getFeatures() [2/2]

int QgsGml::getFeatures ( const QByteArray data,
QGis::WkbType wkbType,
QgsRectangle extent = nullptr 
)

Read from GML data.

Constructor uri param is ignored Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.

Definition at line 179 of file qgsgml.cpp.

◆ idsMap()

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

Get feature ids map.

Definition at line 367 of file qgsgml.h.

◆ totalStepsUpdate

void QgsGml::totalStepsUpdate ( int  totalSteps)
signal

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