Bug report #18568

QGIS shows 0 instead of NULL in identify result pane for WFS properties of type int

Added by Michael Haertel about 6 years ago. Updated almost 6 years ago.

Category:Web Services clients/WFS
Affected QGIS version:2.18.14 Regression?:No
Operating System:Windows 7 64 Bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:26456


  • create a spatial DB table in POSTGIS and define a DB field as Integer type
  • leave the field empty and publish that Featureclass as a WFS service (I used GeoServer 2.13.0)
  • Open QGIS and connect to the WFS Service using version 2.0
  • Load the FeatureClass in QGIS and visualize it (drag the FeatureClass to the layer pane)
  • Use the identify tool and click on a feature with a NULL value for an integer property ("xsd:int")
  • Look at the query result pane: The value shows 0 instead of NULL
Some checks:
  • In the DescribeFeatureType response the integer property is listed as "<xsd:element maxOccurs="1" minOccurs="0" name="bundesland_id" nillable="true" type="xsd:int" />"
  • In the DescribeFeatureType response the double property is listed as "<xsd:element maxOccurs="1" minOccurs="0" name="costs_deployment" nillable="true" type="xsd:double" />"
  • Empty DOUBLE properties ("xsd:double") are shown correctly as NULL in Query Results pane
  • In the resulting XML from the GetFeature request, all properties with NULL values are correctly suppressed as of WFS specification
  • The FeatureClass is returned correctly from the WFS service when the Filter "<fes:PropertyIsNull>" on the integer field is used


#1 Updated by Even Rouault almost 6 years ago

  • Status changed from Open to Feedback

Looks like a duplicate of https://issues.qgis.org/issues/18674 , which I can't replicate
Can you replicate your issue with QGIS dev ?

#2 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

Closing for lack of feedback.

Also available in: Atom PDF