2

When I try to load WFS layer it shows blank area, even there is some information in attribute table. And instead on vector layer it shows new icon.

Here is the source: https://www.avoindata.fi/data/fi/dataset/oulun-kaupungin-aanestysaluejako

Here is WFS link: https://e-kartta.ouka.fi/TeklaOGCWebOpen/WFS.ashx

2 Answers 2

6

Unfortunately they have configured their service to contain all the geometries as GEOMETRYCOLLECTION datatype, that QGIS does not handle. Test with

https://e-kartta.ouka.fi/TeklaOGCWebOpen/WFS.ashx?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=gis:Aanestysalueet&MAXFEATURES=1&SRSNAME=EPSG:3133

You'll see that the returned GML contains a geometrycollection with one polygonz and one pointz geometry.

GDAL can read data from the service

ogrinfo WFS:"https://e-kartta.ouka.fi/TeklaOGCWebOpen/WFS.ashx" gis:Aanestysalueet  

If you want to get the data and get rid of the geometry collections I would suggest to use ogr2ogr https://gdal.org/programs/ogr2ogr.html with the -explodecollections option

-explodecollections

Produce one feature for each geometry in any kind of geometry collection in the source file, applied after any -sql option.

4

There appears to be an issue with the returned GML whether it be the default GML2, or the GML3 requested by QGIS; that is both of these requests give invalid responses:

https://e-kartta.ouka.fi/TeklaOGCWebOpen/WFS.ashx?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&TYPENAME=gis:Kaupunginosat&MAXFEATURES=1&OUTPUTFORMAT=GML3

https://e-kartta.ouka.fi/TeklaOGCWebOpen/WFS.ashx?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&TYPENAME=gis:Kaupunginosat&MAXFEATURES=1&

The errors for the GML3 response are:

Attribute 'srsName' must appear on element 'gml:MultiGeometry'.

Invalid content was found starting with element '{"http://www.opengis.net/gml":PolyhedralSurface}'. One of '{"http://www.opengis.net/gml":_Geometry}' is expected.

Invalid content was found starting with element '{"http://www.opengis.net/gml":name}'. One of '{"http://www.opengis.net/gml":coord, "http://www.opengis.net/gml":coordinates}' is expected.

The error on the GML2 response is:

Invalid content was found starting with element '{"http://www.opengis.net/gml":name}'. One of '{"http://www.opengis.net/gml":coord, "http://www.opengis.net/gml":coordinates}' is expected.

I see that QGIS doesn't allow you to request GML2 from a WFS 1.0 service, which may be a potential issue (selection box is greyed out).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.