Feature request #19505

Can't load a WFS feature type that includes a GeometryCollection GML element

Added by Robin Houtmeyers over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WFS
Pull Request or Patch supplied:No Resolution:invalid
Easy fix?:No Copied to github as #:27333

Description

During interoperability tests between QGIS and the OGC-compliant (WFS 1.0, 1.1 and 2.0) LuciadFusion WFS server from Hexagon, it was noted that QGIS did not load WFS feature types containing a MultiGeometry GML element in the GetFeature response. An example of such a feature type is available here:

https://sampleservices.luciad.com/ogc/wfs/sampleswfs?REQUEST=GetFeature&SERVICE=WFS&TYPENAME=rivers&VERSION=1.1.0

Could this be a bug / limitation regarding expected GML content in QGIS?

Rivers.xsd Magnifier (2.56 KB) Robin Houtmeyers, 2018-08-08 12:13 PM

Rivers.gml32 (286 KB) Robin Houtmeyers, 2018-08-08 12:13 PM

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback

Is the same on 3.2? and what about QGIS ltr (2.18)? Have you tested the qgis WFS client with other WFS servers and multigeometries?

#2 Updated by Robin Houtmeyers over 6 years ago

Giovanni Manghi wrote:

Is the same on 3.2? and what about QGIS ltr (2.18)? Have you tested the qgis WFS client with other WFS servers and multigeometries?

The behavior is indeed the same on 3.2 and LTR (2.18). QGIS indicates that the feature does not have a geometry.
I haven't found another public WFS yet with similar output.

#3 Updated by Giovanni Manghi over 6 years ago

I haven't found another public WFS yet with similar output.

can't you just try a local installation of qgis server/geoserver/mapserver? Thanks.

#4 Updated by Robin Houtmeyers over 6 years ago

  • Status changed from Feedback to Open

Giovanni Manghi wrote:

I haven't found another public WFS yet with similar output.

can't you just try a local installation of qgis server/geoserver/mapserver? Thanks.

OK. The input data is GML; it seems Geoserver cannot read that as input; I'll look at mapserver. Apart from this, I hope this doesn't block any QGIS investigations; the service is OGC WFS 1.0/1.1/2.0 compliant + the outputted GML data is well-formed + valid according to the GML application schema made available through the DescribeFeatureType request.

#5 Updated by Giovanni Manghi over 6 years ago

Robin Houtmeyers wrote:

Giovanni Manghi wrote:

I haven't found another public WFS yet with similar output.

can't you just try a local installation of qgis server/geoserver/mapserver? Thanks.

OK. The input data is GML; it seems Geoserver cannot read that as input; I'll look at mapserver. Apart from this, I hope this doesn't block any QGIS investigations; the service is OGC WFS 1.0/1.1/2.0 compliant + the outputted GML data is well-formed + valid according to the GML application schema made available through the DescribeFeatureType request.

if geoserver cann't read GML (as you say), how it can produce a valid output?
does it happens if you use another datasource for geoserver instead of gml (not sure how it could be a factor as the output is anyway gml)?

#6 Updated by Robin Houtmeyers over 6 years ago

Well, I can set up a Geoserver, load a data source that it can read (e.g. a random SHP file) and access it through WFS + GML via QGIS or our Luciad WFS client. However, there are numerous possibilities to encode data in GML (e.g. 26 ways to encode a simple polygon: http://erouault.blogspot.com/2014/04/gml-madness.html), which also depend on the complexity of the input data. Ideally, a WFS client can read all of these variations. In my test, I loaded a GML dataset in our server containing multiple geometries per feature, which looks like this in our WFS:

https://sampleservices.luciad.com/ogc/wfs/sampleswfs?REQUEST=GetFeature&SERVICE=WFS&TYPENAME=rivers&VERSION=1.1.0

One of our users would like to be able to read this response in QGIS.

#7 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback

Robin Houtmeyers wrote:

. In my test, I loaded a GML dataset in our server containing multiple geometries per feature, which looks like this in our WFS:

can you share this gml? so we can test using also other servers?

#8 Updated by Robin Houtmeyers over 6 years ago

Yes, please find attached the data; it is a rivers dataset for North America.

#9 Updated by Giovanni Manghi over 6 years ago

Robin Houtmeyers wrote:

Yes, please find attached the data; it is a rivers dataset for North America.

giovanni@sibirica:~/Downloads$ ogrinfo Rivers.gml32
Had to open data source read-only.
INFO: Open of `Rivers.gml32'
using driver `GML' successful.
1: rivers (Geometry Collection)

it is a geometry collection (not a multi-point/multi-linestring/multi-polygon)... is this what you mean when above you said "multiple geometries per feature"?

#10 Updated by Robin Houtmeyers over 6 years ago

I mean that the features contain multi-geometry elements; for instance:

<rivers gml:id="riversType_1">
      <geometry>
        <gml:MultiGeometry gml:id="riversType_1_1">
          <gml:geometryMembers>
            <gml:Curve gml:id="riversType_1_2">
              <gml:segments>
                <gml:GeodesicString>
                  <gml:posList>-95.05949401855469 35.45878601074219 ...</gml:posList>
                </gml:GeodesicString>
              </gml:segments>
            </gml:Curve>
            <gml:Curve gml:id="riversType_1_3">
              <gml:segments>
                <gml:GeodesicString>
                  <gml:posList>-106.37887573242188 39.361663818359375 ...</gml:posList>
                </gml:GeodesicString>
              </gml:segments>
            </gml:Curve>
          </gml:geometryMembers>
        </gml:MultiGeometry>
      </geometry>
      <NAME>Arkansas</NAME>
      <SYSTEM>Mississippi</SYSTEM>
    </rivers>

#11 Updated by Giovanni Manghi over 6 years ago

Robin Houtmeyers wrote:

I mean that the features contain multi-geometry elements; for instance:
[...]

multipart geomeries are supported by qgis (and its wfs client), geometry collections are not. The one you posted seems to be a collection.

#12 Updated by Robin Houtmeyers over 6 years ago

OK thanks for the feedback. Would this be something that could be added to QGIS?

#13 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Robin Houtmeyers wrote:

OK thanks for the feedback. Would this be something that could be added to QGIS?

you should ask in the developers mailing list, but is my understanding that it would not be an easy task.

#14 Updated by Alessandro Pasotti over 6 years ago

  • Subject changed from Can't load a WFS feature type that includes a MultiGeometry GML element to Can't load a WFS feature type that includes a GeometryCollection GML element
  • Tracker changed from Bug report to Feature request

Also available in: Atom PDF