mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Sipify core.QgsGml
This commit is contained in:
parent
264c9028de
commit
742c1aa99d
@ -12,7 +12,6 @@ core/qgsexpressioncontextgenerator.sip
|
||||
core/qgsfeaturerequest.sip
|
||||
core/qgsgeometrysimplifier.sip
|
||||
core/qgsgeometryvalidator.sip
|
||||
core/qgsgml.sip
|
||||
core/qgsgmlschema.sip
|
||||
core/qgsmaptopixelgeometrysimplifier.sip
|
||||
core/qgstransaction.sip
|
||||
|
@ -1,54 +1,96 @@
|
||||
class QgsGml: QObject
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/qgsgml.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsGml : QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgsgml.h>
|
||||
%Docstring
|
||||
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 *
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsgml.h"
|
||||
%End
|
||||
public:
|
||||
QgsGml(
|
||||
const QString& typeName,
|
||||
const QString& geometryAttribute,
|
||||
const QString &typeName,
|
||||
const QString &geometryAttribute,
|
||||
const QgsFields &fields );
|
||||
|
||||
~QgsGml();
|
||||
|
||||
/** Does the Http GET request to the wfs server
|
||||
* Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
|
||||
* @param uri GML URL
|
||||
* @param wkbType wkbType to retrieve
|
||||
* @param extent retrieved extents
|
||||
* @param userName username for authentication
|
||||
* @param password password for authentication
|
||||
* @param authcfg authentication configuration id
|
||||
* @return 0 in case of success
|
||||
* @note available in python as getFeaturesUri
|
||||
*/
|
||||
int getFeatures( const QString& uri,
|
||||
QgsWkbTypes::Type* wkbType,
|
||||
QgsRectangle* extent = 0,
|
||||
const QString& userName = QString(),
|
||||
const QString& password = QString(),
|
||||
int getFeatures( const QString &uri,
|
||||
QgsWkbTypes::Type *wkbType,
|
||||
QgsRectangle *extent = 0,
|
||||
const QString &userName = QString(),
|
||||
const QString &password = QString(),
|
||||
const QString &authcfg = QString() ) /PyName=getFeaturesUri/;
|
||||
%Docstring
|
||||
Does the Http GET request to the wfs server
|
||||
Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
|
||||
\param uri GML URL
|
||||
\param wkbType wkbType to retrieve
|
||||
\param extent retrieved extents
|
||||
\param userName username for authentication
|
||||
\param password password for authentication
|
||||
\param authcfg authentication configuration id
|
||||
:return: 0 in case of success
|
||||
.. note::
|
||||
|
||||
available in Python as getFeaturesUri
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Read from GML data. Constructor uri param is ignored
|
||||
* Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
|
||||
*/
|
||||
int getFeatures( const QByteArray &data, QgsWkbTypes::Type *wkbType, QgsRectangle *extent = 0 );
|
||||
%Docstring
|
||||
Read from GML data. Constructor uri param is ignored
|
||||
Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Get parsed features for given type name */
|
||||
QMap<qint64, QgsFeature* > featuresMap() const;
|
||||
QMap<QgsFeatureId, QgsFeature * > featuresMap() const;
|
||||
%Docstring
|
||||
Get parsed features for given type name
|
||||
:rtype: QMap<QgsFeatureId, QgsFeature * >
|
||||
%End
|
||||
|
||||
/** Get feature ids map */
|
||||
QMap<qint64, QString > idsMap() const;
|
||||
QMap<QgsFeatureId, QString > idsMap() const;
|
||||
%Docstring
|
||||
Get feature ids map
|
||||
:rtype: QMap<QgsFeatureId, str >
|
||||
%End
|
||||
|
||||
/** Returns features spatial reference system
|
||||
@note Added in QGIS 2.1 */
|
||||
QgsCoordinateReferenceSystem crs() const;
|
||||
%Docstring
|
||||
Returns features spatial reference system
|
||||
.. versionadded:: 2.1
|
||||
:rtype: QgsCoordinateReferenceSystem
|
||||
%End
|
||||
|
||||
signals:
|
||||
void dataReadProgress( int progress );
|
||||
void totalStepsUpdate( int totalSteps );
|
||||
//also emit signal with progress and totalSteps together (this is better for the status message)
|
||||
void dataProgressAndSteps( int progress, int totalSteps );
|
||||
%Docstring
|
||||
Also emit signal with progress and totalSteps together (this is better for the status message)
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/qgsgml.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -34,6 +34,8 @@
|
||||
|
||||
class QgsCoordinateReferenceSystem;
|
||||
|
||||
#ifndef SIP_RUN
|
||||
|
||||
/** \ingroup core
|
||||
* This class builds features from GML data in a streaming way. The caller must call processData()
|
||||
* as soon it has new content from the source. At any point, it can call
|
||||
@ -325,6 +327,7 @@ class CORE_EXPORT QgsGmlStreamingParser
|
||||
bool mFoundUnhandledGeometryElement;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/** \ingroup core
|
||||
* This class reads data from a WFS server or alternatively from a GML file. It
|
||||
@ -373,6 +376,12 @@ class CORE_EXPORT QgsGml : public QObject
|
||||
\since QGIS 2.1 */
|
||||
QgsCoordinateReferenceSystem crs() const;
|
||||
|
||||
signals:
|
||||
void dataReadProgress( int progress );
|
||||
void totalStepsUpdate( int totalSteps );
|
||||
//! Also emit signal with progress and totalSteps together (this is better for the status message)
|
||||
void dataProgressAndSteps( int progress, int totalSteps );
|
||||
|
||||
private slots:
|
||||
|
||||
void setFinished();
|
||||
@ -380,12 +389,6 @@ class CORE_EXPORT QgsGml : public QObject
|
||||
//! Takes progress value and total steps and emit signals 'dataReadProgress' and 'totalStepUpdate'
|
||||
void handleProgressEvent( qint64 progress, qint64 totalSteps );
|
||||
|
||||
signals:
|
||||
void dataReadProgress( int progress );
|
||||
void totalStepsUpdate( int totalSteps );
|
||||
//also emit signal with progress and totalSteps together (this is better for the status message)
|
||||
void dataProgressAndSteps( int progress, int totalSteps );
|
||||
|
||||
private:
|
||||
|
||||
/** This function evaluates the layer bounding box from the features and
|
||||
|
Loading…
x
Reference in New Issue
Block a user