1

I have loaded a WFS layer in QGIS and want to display the gml:id of the features in the attribute table. Is this somehow possible? I can see the gml:ids in other applications (ex FME).

1
  • Do you have an example WFS? – HeikkiVesanto Oct 22 '19 at 16:11
1

I'm not sure if it's possible in the attribute table unless the WFS defines the identifier as an attribute.

You can check by doing a DescribeFeatureType request like:

http://services.sandre.eaufrance.fr/geo/zon_FXX?SERVICE=WFS&REQUEST=DescribeFeatureType&VERSION=2.0.0&TYPENAMES=sa:Sage&outputformat=text/xml;%20subtype=gml/2.1.2&

Which in this example gives:

<?xml version='1.0' encoding="UTF-8" ?>
<schema
   targetNamespace="http://xml.sandre.eaufrance.fr/" 
   xmlns:sa="http://xml.sandre.eaufrance.fr/" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns="http://www.w3.org/2001/XMLSchema"
   xmlns:gml="http://www.opengis.net/gml"
   elementFormDefault="qualified" version="0.1" >
  <import namespace="http://www.opengis.net/gml"
          schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd" />
  <element name="Sage" 
           type="sa:SageType" 
           substitutionGroup="gml:_Feature" />
  <complexType name="SageType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="msGeometry" type="gml:GeometryPropertyType" minOccurs="0" maxOccurs="1"/>
          <element name="CodeNatZone" minOccurs="0" type="string"/>
          <element name="NomZone" minOccurs="0" type="string"/>
          <element name="TypeZone" minOccurs="0" type="integer"/>
          <element name="EtatAvancementSage" minOccurs="0" type="string"/>
          <element name="TypePerimSage" minOccurs="0" type="string"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
</schema>

So no gml:id defined as an attribute, which is reflected in the attribute table in QGIS.

Attribute information in QGIS for selected WFS feature

However, you can get to the gml:id for the selected feature in QGIS by looking at the Derived values > Feature ID

GML Feature ID as derived property of selected feature

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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