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).

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

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:


Which in this example gives:

<?xml version='1.0' encoding="UTF-8" ?>
   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" 
           substitutionGroup="gml:_Feature" />
  <complexType name="SageType">
      <extension base="gml:AbstractFeatureType">
          <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"/>

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.