Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFS] Wrong geometry type for layer / missing Mixed Geometry WFS Support #49328

Closed
2 tasks done
pathmapper opened this issue Jul 12, 2022 · 2 comments · Fixed by #51144
Closed
2 tasks done

[WFS] Wrong geometry type for layer / missing Mixed Geometry WFS Support #49328

pathmapper opened this issue Jul 12, 2022 · 2 comments · Fixed by #51144
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! WFS data provider

Comments

@pathmapper
Copy link
Contributor

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:

bug_wfs_collection.mp4

Steps to reproduce the issue

  1. Add the following WFS connection to QGIS browser: https://xplanung.freiburg.de/xplansyn-wfs/services/xplansynwfs
  2. Add the feature type: xplan:BP_AnpflanzungBindungErhaltung
  3. See error: A polygon layer is added, only 3 polygons are visible, feature count and attribute table shows 10 features.

Versions

QGIS version 3.27.0-Master QGIS code revision 876188b
Qt version 5.12.8
Python version 3.8.10
GDAL/OGR version 3.0.4
PROJ version 6.3.1
EPSG Registry database version v9.8.6 (2020-01-22)
Compiled against GEOS 3.8.0-CAPI-1.13.1 Running against GEOS 3.8.0-CAPI-1.13.1
SQLite version 3.31.1
PostgreSQL client version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1)
SpatiaLite version 4.3.0a
QWT version 6.1.4
QScintilla2 version 2.11.2
OS version Ubuntu 20.04.4 LTS
       
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

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS 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:

image

image

@pathmapper
Copy link
Contributor Author

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

grafik

@pathmapper
Copy link
Contributor Author

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 (#49334 (comment)).

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.

@rouault rouault changed the title [WFS] Wrong geometry type for layer [WFS] Wrong geometry type for layer / missing Mixed Geometry WFS Support Sep 17, 2022
@rouault rouault self-assigned this Nov 28, 2022
rouault added a commit to rouault/QGIS that referenced this issue Dec 7, 2022
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
rouault added a commit to rouault/QGIS that referenced this issue Dec 7, 2022
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
rouault added a commit to rouault/QGIS that referenced this issue Dec 8, 2022
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
rouault added a commit to rouault/QGIS that referenced this issue Dec 8, 2022
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
rouault added a commit to rouault/QGIS that referenced this issue Dec 14, 2022
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
rouault added a commit to rouault/QGIS that referenced this issue Jan 3, 2023
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
nyalldawson pushed a commit to nyalldawson/QGIS that referenced this issue Jan 10, 2023
…ee servers

or any server implementing IsPoint, IsCurve and IsSurface filtering
functions.

When such a layer is added to the project, the Select Items to Add
dialog box used for example for OGR vector layers with unknown geometry
type is displayed, enabling the user to select one or several layers
among ones of NoGeometry/MultiPoint/MultiCurve/MultiSurface/GeometryCollection
types.

Fixes qgis#49328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! WFS data provider
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants