Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7027 closed defect (fixed)

GML: Integer fields with NULL values are reported as String

Reported by: mkuhn Owned by: warmerdam
Priority: normal Milestone: 2.2.2
Component: OGR_SF Version: 2.2.1
Severity: normal Keywords: gml nil
Cc:

Description

If a gml file has an integer field which contains a NULL value, this field will no longer be reported as an integer field, but as a string field instead.

As an example dataset, the file polys_centroid.gml can be taken.

The file was created with an older version of GDAL, so NULL fields are still missing from the file itself. For this file, the field intval is correctly reported as integer.

The same file created with newer versions of GDAL (tested 2.2.1) will contain an additional entry <ogr:intval xsi:nil="true"/> for the feature polys.2 (See a manually patched version here). As soon as this entry is there, the field is reported as String type.

Change History (3)

comment:1 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 39984:

GML: fix field type detection logic to avoid a field with xsi:nil=true to be identified as a string (fixes #7027)

comment:2 by Even Rouault, 7 years ago

In 39985:

GML: fix field type detection logic to avoid a field with xsi:nil=true to be identified as a string (fixes #7027)

comment:3 by Even Rouault, 7 years ago

Component: defaultOGR_SF
Keywords: gml nil added
Milestone: 2.2.2
Note: See TracTickets for help on using tickets.