Closed pathmapper closed 1 year ago
In case the above example doesn't work anymore:
Another publicly available WFS which is serving mixed geometry types for a feature type resulting in incorrect layer geometry type when loading into QGIS via WFS connection:
WFS endpoint: http://xplanung.lkee.de/xplansyn-wfs/services/xplansynwfs
Feature type: xplan:BP_AnpflanzungBindungErhaltung
Ideally QGIS would require you to manually select which geometry type(s) you want to load from a mixed geometry WFS source into the project like it is already the case for other sources which support mixed geometry types (https://github.com/qgis/QGIS/pull/49334#issuecomment-1182580051).
Another option would be to automatically load the features with different geometry types in multiple layers according to the geometry type.
I think the difficulty with WFS sources compared to other sources might be that it could be the case that you don't know which geometry types you'll get from a WFS for a certain feature type until the full response document is received - this doesn't play well with e.g. WFS paging.
What is the bug or the crash?
Wrong geometry type for layer from WFS:
The following request returns a collection: 10 features in total - 3 polygons and 7 points:
https://xplanung.freiburg.de/xplansyn-wfs/services/xplansynwfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=xplan:BP_AnpflanzungBindungErhaltung&COUNT=15000&SRSNAME=EPSG:25832
But a polygon layer is added to the Layers widget:
https://user-images.githubusercontent.com/20856381/178444248-988b710a-b8f6-4250-ac30-c1ec8aef481e.mp4
Steps to reproduce the issue
xplan:BP_AnpflanzungBindungErhaltung
Versions
Active Python plugins sagaprovider | 2.12.99 grassprovider | 2.12.99 MetaSearch | 0.3.6 processing | 2.12.99 db_manager | 0.1.20
Supported QGIS version
New profile
Additional context
Same result if layer is added via Data Source Manager.
If the response GML (xplansynwfs.zip) is added via drag and drop to QGIS, two layers with correct geometry type and feature count are added: