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 );
113 const QMap<QString, QPair<QString, bool>> &fieldNameToSrcLayerNameFieldNameMap,
114 const QMap<QString, QString> &namespacePrefixToURIMap );
120 bool processData(
const QByteArray &data,
bool atEnd, QString &errorMsg );
126 bool processData(
const QByteArray &data,
bool atEnd );
134 QVector<QgsGmlFeaturePtrGmlIdPair> getAndStealReadyFeatures();
189 void startElement(
const XML_Char *el,
const XML_Char **attr );
190 void endElement(
const XML_Char *el );
191 void characters(
const XML_Char *chars,
int len );
192 static void start(
void *data,
const XML_Char *el,
const XML_Char **attr )
196 static void end(
void *data,
const XML_Char *el )
200 static void chars(
void *data,
const XML_Char *chars,
int len )
206 void addStringContentToJson();
209 void setAttribute(
const QString &name,
const QString &value );
219 int readEpsgFromAttribute(
int &epsgNr,
const XML_Char **attr );
227 QString readAttribute(
const QString &attributeName,
const XML_Char **attr )
const;
229 bool createBBoxFromCoordinateString(
QgsRectangle &bb,
const QString &coordString )
const;
237 int pointsFromCoordinateString( QList<QgsPointXY> &points,
const QString &coordString )
const;
246 int pointsFromPosListString( QList<QgsPointXY> &points,
const QString &coordString,
int dimension )
const;
248 int pointsFromString( QList<QgsPointXY> &points,
const QString &coordString )
const;
250 int getLineWKB(
QgsWkbPtr &wkbPtr,
const QList<QgsPointXY> &lineCoordinates )
const;
251 int getRingWKB(
QgsWkbPtr &wkbPtr,
const QList<QgsPointXY> &ringCoordinates )
const;
259 int createMultiLineFromFragments();
260 int createMultiPointFromFragments();
261 int createPolygonFromFragments();
262 int createMultiPolygonFromFragments();
264 int totalWKBFragmentSize()
const;
267 ParseMode modeStackTop() {
return mParseModeStack.isEmpty() ?
None : mParseModeStack.top(); }
270 ParseMode modeStackPop() {
return mParseModeStack.isEmpty() ?
None : mParseModeStack.pop(); }
273 void createParser(
const QByteArray &encoding = QByteArray() );
276 XML_Parser mParser =
nullptr;
279 QVector<QgsGmlFeaturePtrGmlIdPair> mFeatureList;
282 QList<LayerProperties> mLayerProperties;
283 QMap< QString, LayerProperties > mMapTypeNameToProperties;
287 QByteArray mTypeNameBA;
288 const char *mTypeNamePtr =
nullptr;
289 size_t mTypeNameUTF8Len;
296 QString mGeometryAttribute;
297 QByteArray mGeometryAttributeBA;
298 const char *mGeometryAttributePtr =
nullptr;
299 size_t mGeometryAttributeUTF8Len;
302 QMap<QString, QPair<int, QgsField> > mThematicAttributes;
303 QMap<QString, QPair<QString, bool>> mMapXPathToFieldNameAndIsNestedContent;
304 QMap<QString, QString> mMapNamespaceURIToNamespacePrefix;
307 QString mExceptionText;
308 bool mTruncatedResponse;
311 int mFeatureTupleDepth;
312 QString mCurrentTypename;
314 QStack<ParseMode> mParseModeStack;
315 QString mCurrentXPathWithinFeature;
319 QVector<QVariant> mCurrentAttributes;
320 QString mCurrentFeatureId;
325 bool mBoundedByNullFound;
333 QList< QList<QgsWkbPtr> > mCurrentWKBFragments;
334 QString mAttributeName;
335 int mAttributeDepth = -1;
336 bool mAttributeValIsNested =
false;
338 QMap< QString, QString > mMapFieldNameToJSONContent;
339 nlohmann::json mAttributeJson;
340 QStack<nlohmann::json *> mAttributeJsonCurrentStack;
343 QString mCoordinateSeparator;
345 QString mTupleSeparator;
347 QStack<int> mDimensionStack;
359 QString mGMLNameSpaceURI;
360 const char *mGMLNameSpaceURIPtr =
nullptr;
362 AxisOrientationLogic mAxisOrientationLogic;
364 bool mInvertAxisOrientationRequest;
366 bool mInvertAxisOrientation;
372 std::string mGeometryString;
374 bool mFoundUnhandledGeometryElement;
376 QTextCodec *mCodec =
nullptr;
396 const QString &geometryAttribute,
410 int getFeatures(
const QString &uri,
413 const QString &userName = QString(),
414 const QString &password = QString(),
415 const QString &authcfg = QString() )
SIP_PYNAME( getFeaturesUri );
423 QMap<QgsFeatureId, QgsFeature * >
featuresMap()
const {
return mFeatures; }
426 QMap<QgsFeatureId, QString >
idsMap()
const {
return mIdMap; }
444 void handleProgressEvent( qint64 progress, qint64 totalSteps );
454 void calculateExtentFromFeatures();
456 void fillMapsFromParser();
468 QMap<QgsFeatureId, QgsFeature * > mFeatures;
473 QMap<QgsFeatureId, QString > mIdMap;