QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>

Signals

void dataReadProgress (int progress)
void totalStepsUpdate (int totalSteps)
void dataProgressAndSteps (int progress, int totalSteps)

Public Member Functions

 QgsGml (const QString &typeName, const QString &geometryAttribute, const QgsFields &fields)
 ~QgsGml ()
int getFeatures (const QString &uri, QGis::WkbType *wkbType, QgsRectangle *extent=0, const QString &userName=QString(), const QString &password=QString())
 Does the Http GET request to the wfs server Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
int getFeatures (const QByteArray &data, QGis::WkbType *wkbType, QgsRectangle *extent=0)
 Read from GML data.
QMap< QgsFeatureId, QgsFeature * > featuresMap () const
 Get parsed features for given type name.
QMap< QgsFeatureId, QString > idsMap () const
 Get feature ids map.
QgsCoordinateReferenceSystem crs () const
 Returns features spatial reference system.

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

Constructor & Destructor Documentation

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

Member Function Documentation

QgsCoordinateReferenceSystem QgsGml::crs ( ) const

Returns features spatial reference system.

Note
Added in QGIS 2.1
void QgsGml::dataProgressAndSteps ( int  progress,
int  totalSteps 
)
signal
void QgsGml::dataReadProgress ( int  progress)
signal
QMap<QgsFeatureId, QgsFeature* > QgsGml::featuresMap ( ) const
inline

Get parsed features for given type name.

int QgsGml::getFeatures ( const QString &  uri,
QGis::WkbType wkbType,
QgsRectangle extent = 0,
const QString &  userName = QString(),
const QString &  password = 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
Returns
0 in case of success
int QgsGml::getFeatures ( const QByteArray &  data,
QGis::WkbType wkbType,
QgsRectangle extent = 0 
)

Read from GML data.

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

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

Get feature ids map.

void QgsGml::totalStepsUpdate ( int  totalSteps)
signal

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