QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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>

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=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. More...
 
int getFeatures (const QByteArray &data, QGis::WkbType *wkbType, QgsRectangle *extent=0)
 Read from GML data. More...
 
QMap< QgsFeatureId, QString > idsMap () const
 Get 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 41 of file qgsgml.h.

Constructor & Destructor Documentation

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

Definition at line 36 of file qgsgml.cpp.

QgsGml::~QgsGml ( )

Definition at line 64 of file qgsgml.cpp.

Member Function Documentation

QgsCoordinateReferenceSystem QgsGml::crs ( ) const

Returns features spatial reference system.

Note
Added in QGIS 2.1

Definition at line 987 of file qgsgml.cpp.

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.

Definition at line 69 of file qgsgml.h.

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

Definition at line 68 of file qgsgml.cpp.

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.

Definition at line 169 of file qgsgml.cpp.

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

Get feature ids map.

Definition at line 72 of file qgsgml.h.

void QgsGml::totalStepsUpdate ( int  totalSteps)
signal

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