82 } AxisOrientationLogic;
86 const QString &geometryAttribute,
88 AxisOrientationLogic axisOrientationLogic = Honour_EPSG_if_urn,
89 bool invertAxisOrientation =
false );
94 const QMap< QString, QPair<QString, QString> > &mapFieldNameToSrcLayerNameFieldName,
95 AxisOrientationLogic axisOrientationLogic = Honour_EPSG_if_urn,
96 bool invertAxisOrientation =
false );
108 bool processData(
const QByteArray &data,
bool atEnd, QString &errorMsg );
114 bool processData(
const QByteArray &data,
bool atEnd );
122 QVector<QgsGmlFeaturePtrGmlIdPair> getAndStealReadyFeatures();
177 void startElement(
const XML_Char *el,
const XML_Char **attr );
178 void endElement(
const XML_Char *el );
179 void characters(
const XML_Char *chars,
int len );
180 static void start(
void *data,
const XML_Char *el,
const XML_Char **attr )
184 static void end(
void *data,
const XML_Char *el )
188 static void chars(
void *data,
const XML_Char *chars,
int len )
194 void setAttribute(
const QString &name,
const QString &value );
204 int readEpsgFromAttribute(
int &epsgNr,
const XML_Char **attr );
212 QString readAttribute(
const QString &attributeName,
const XML_Char **attr )
const;
214 bool createBBoxFromCoordinateString(
QgsRectangle &bb,
const QString &coordString )
const;
222 int pointsFromCoordinateString( QList<QgsPointXY> &points,
const QString &coordString )
const;
231 int pointsFromPosListString( QList<QgsPointXY> &points,
const QString &coordString,
int dimension )
const;
233 int pointsFromString( QList<QgsPointXY> &points,
const QString &coordString )
const;
235 int getLineWKB(
QgsWkbPtr &wkbPtr,
const QList<QgsPointXY> &lineCoordinates )
const;
236 int getRingWKB(
QgsWkbPtr &wkbPtr,
const QList<QgsPointXY> &ringCoordinates )
const;
244 int createMultiLineFromFragments();
245 int createMultiPointFromFragments();
246 int createPolygonFromFragments();
247 int createMultiPolygonFromFragments();
249 int totalWKBFragmentSize()
const;
252 ParseMode modeStackTop() {
return mParseModeStack.isEmpty() ?
None : mParseModeStack.top(); }
255 ParseMode modeStackPop() {
return mParseModeStack.isEmpty() ?
None : mParseModeStack.pop(); }
258 void createParser(
const QByteArray &encoding = QByteArray() );
261 XML_Parser mParser =
nullptr;
264 QVector<QgsGmlFeaturePtrGmlIdPair> mFeatureList;
267 QList<LayerProperties> mLayerProperties;
268 QMap< QString, LayerProperties > mMapTypeNameToProperties;
272 QByteArray mTypeNameBA;
273 const char *mTypeNamePtr =
nullptr;
274 size_t mTypeNameUTF8Len;
281 QString mGeometryAttribute;
282 QByteArray mGeometryAttributeBA;
283 const char *mGeometryAttributePtr =
nullptr;
284 size_t mGeometryAttributeUTF8Len;
287 QMap<QString, QPair<int, QgsField> > mThematicAttributes;
290 QString mExceptionText;
291 bool mTruncatedResponse;
294 int mFeatureTupleDepth;
295 QString mCurrentTypename;
297 QStack<ParseMode> mParseModeStack;
301 QVector<QVariant> mCurrentAttributes;
302 QString mCurrentFeatureId;
307 bool mBoundedByNullFound;
315 QList< QList<QgsWkbPtr> > mCurrentWKBFragments;
316 QString mAttributeName;
319 QString mCoordinateSeparator;
321 QString mTupleSeparator;
323 QStack<int> mDimensionStack;
335 QString mGMLNameSpaceURI;
336 const char *mGMLNameSpaceURIPtr =
nullptr;
338 AxisOrientationLogic mAxisOrientationLogic;
340 bool mInvertAxisOrientationRequest;
342 bool mInvertAxisOrientation;
348 std::string mGeometryString;
350 bool mFoundUnhandledGeometryElement;
352 QTextCodec *mCodec =
nullptr;
372 const QString &geometryAttribute,
386 int getFeatures(
const QString &uri,
389 const QString &userName = QString(),
390 const QString &password = QString(),
391 const QString &authcfg = QString() )
SIP_PYNAME( getFeaturesUri );
399 QMap<QgsFeatureId, QgsFeature * >
featuresMap()
const {
return mFeatures; }
402 QMap<QgsFeatureId, QString >
idsMap()
const {
return mIdMap; }
421 void handleProgressEvent( qint64 progress, qint64 totalSteps );
431 void calculateExtentFromFeatures();
433 void fillMapsFromParser();
445 QMap<QgsFeatureId, QgsFeature * > mFeatures;
450 QMap<QgsFeatureId, QString > mIdMap;