85 } AxisOrientationLogic;
89 const QString &geometryAttribute,
91 AxisOrientationLogic axisOrientationLogic = Honour_EPSG_if_urn,
92 bool invertAxisOrientation =
false );
97 const QMap< QString, QPair<QString, QString> > &fieldNameToSrcLayerNameFieldNameMap,
98 AxisOrientationLogic axisOrientationLogic = Honour_EPSG_if_urn,
99 bool invertAxisOrientation =
false );
111 const QMap<QString, QPair<QString, bool>> &fieldNameToSrcLayerNameFieldNameMap,
112 const QMap<QString, QString> &namespacePrefixToURIMap );
118 bool processData(
const QByteArray &data,
bool atEnd, QString &errorMsg );
124 bool processData(
const QByteArray &data,
bool atEnd );
132 QVector<QgsGmlFeaturePtrGmlIdPair> getAndStealReadyFeatures();
187 void startElement(
const XML_Char *el,
const XML_Char **attr );
188 void endElement(
const XML_Char *el );
189 void characters(
const XML_Char *chars,
int len );
190 static void start(
void *data,
const XML_Char *el,
const XML_Char **attr )
194 static void end(
void *data,
const XML_Char *el )
198 static void chars(
void *data,
const XML_Char *chars,
int len )
204 void addStringContentToJson();
207 void setAttribute(
const QString &name,
const QString &value );
217 int readEpsgFromAttribute(
int &epsgNr,
const XML_Char **attr );
225 QString readAttribute(
const QString &attributeName,
const XML_Char **attr )
const;
227 bool createBBoxFromCoordinateString(
QgsRectangle &bb,
const QString &coordString )
const;
235 int pointsFromCoordinateString( QList<QgsPointXY> &points,
const QString &coordString )
const;
244 int pointsFromPosListString( QList<QgsPointXY> &points,
const QString &coordString,
int dimension )
const;
246 int pointsFromString( QList<QgsPointXY> &points,
const QString &coordString )
const;
248 int getLineWKB(
QgsWkbPtr &wkbPtr,
const QList<QgsPointXY> &lineCoordinates )
const;
249 int getRingWKB(
QgsWkbPtr &wkbPtr,
const QList<QgsPointXY> &ringCoordinates )
const;
257 int createMultiLineFromFragments();
258 int createMultiPointFromFragments();
259 int createPolygonFromFragments();
260 int createMultiPolygonFromFragments();
262 int totalWKBFragmentSize()
const;
265 ParseMode modeStackTop() {
return mParseModeStack.isEmpty() ?
None : mParseModeStack.top(); }
268 ParseMode modeStackPop() {
return mParseModeStack.isEmpty() ?
None : mParseModeStack.pop(); }
271 void createParser(
const QByteArray &encoding = QByteArray() );
274 XML_Parser mParser =
nullptr;
277 QVector<QgsGmlFeaturePtrGmlIdPair> mFeatureList;
280 QList<LayerProperties> mLayerProperties;
281 QMap< QString, LayerProperties > mMapTypeNameToProperties;
285 QByteArray mTypeNameBA;
286 const char *mTypeNamePtr =
nullptr;
287 size_t mTypeNameUTF8Len;
294 QString mGeometryAttribute;
295 QByteArray mGeometryAttributeBA;
296 const char *mGeometryAttributePtr =
nullptr;
297 size_t mGeometryAttributeUTF8Len;
300 QMap<QString, QPair<int, QgsField> > mThematicAttributes;
301 QMap<QString, QPair<QString, bool>> mMapXPathToFieldNameAndIsNestedContent;
302 QMap<QString, QString> mMapNamespaceURIToNamespacePrefix;
305 QString mExceptionText;
306 bool mTruncatedResponse;
309 int mFeatureTupleDepth;
310 QString mCurrentTypename;
312 QStack<ParseMode> mParseModeStack;
313 QString mCurrentXPathWithinFeature;
317 QVector<QVariant> mCurrentAttributes;
318 QString mCurrentFeatureId;
323 bool mBoundedByNullFound;
331 QList< QList<QgsWkbPtr> > mCurrentWKBFragments;
332 QString mAttributeName;
333 int mAttributeDepth = -1;
334 bool mAttributeValIsNested =
false;
336 QMap< QString, QString > mMapFieldNameToJSONContent;
337 nlohmann::json mAttributeJson;
338 QStack<nlohmann::json *> mAttributeJsonCurrentStack;
341 QString mCoordinateSeparator;
343 QString mTupleSeparator;
345 QStack<int> mDimensionStack;
357 QString mGMLNameSpaceURI;
358 const char *mGMLNameSpaceURIPtr =
nullptr;
360 AxisOrientationLogic mAxisOrientationLogic;
362 bool mInvertAxisOrientationRequest;
364 bool mInvertAxisOrientation;
370 std::string mGeometryString;
372 bool mFoundUnhandledGeometryElement;
374 QTextCodec *mCodec =
nullptr;
393 const QString &geometryAttribute,
408 int getFeatures(
const QString &uri,
411 const QString &userName = QString(),
412 const QString &password = QString(),
413 const QString &authcfg = QString() )
SIP_PYNAME( getFeaturesUri );
423 QMap<QgsFeatureId, QgsFeature * >
featuresMap()
const {
return mFeatures; }
426 QMap<QgsFeatureId, QString >
idsMap()
const {
return mIdMap; }
462 void handleProgressEvent( qint64 progress, qint64 totalSteps );
472 void calculateExtentFromFeatures();
474 void fillMapsFromParser();
486 QMap<QgsFeatureId, QgsFeature * > mFeatures;
491 QMap<QgsFeatureId, QString > mIdMap;