[QGIS-Developer] WFS and NULL values

Alessandro Pasotti apasotti at gmail.com
Wed Jan 23 00:38:29 PST 2019


On Wed, Jan 23, 2019 at 9:31 AM René-Luc Dhont <rldhont at gmail.com> wrote:

> Hi Allessandro,
>
> Do you speak about these PR:
> * https://github.com/qgis/QGIS/pull/8536 [Server] Null field value in GML
> has to be empty string 2.18
> * https://github.com/qgis/QGIS/pull/8537 [Server][WFS] Null field value
> in GML has to be empty string 3.4
>
> I don't think it is a GML specific issue, but something about XSD and XML.
>

Hi René-Luc,

thank you for you reply,

no, I'm talking about this:

image you have a field named "typ" with a NULL value, the XML should not
contain that value at all, currently we get this:

<qgs:fid>22</qgs:fid><qgs:typ></qgs:typ><qgs:name>Oebisfelder
Straße</qgs:name>

while I think that we should get that:

<qgs:fid>22</qgs:fid><qgs:name>Oebisfelder Straße</qgs:name>

In other words: if a field is NULL it should not be empty but completely
omitted from the resulting GML (I suppose this is to make a difference
between empty and null in case of not-numeric fields).



>
> Regards,
> René-Luc
>
> Le 23/01/2019 à 09:14, Paul Blottiere a écrit :
>
> Hi Alessandro,
>
> > If it is a bug I can work on the fix, but maybe I'm missing something.
>
> Have you taken a look to the compliance OGC tests for WFS 1.X? If there's
> tests about this particular point, we'll know for sure if it's something to
> fix.
>
> Regards.
>
> Paul
>
> Le mar. 22 janv. 2019 à 17:51, Alessandro Pasotti <apasotti at gmail.com> a
> écrit :
>
>> Hi all,
>>
>> while working on QGIS server I noticed that WFS GetFeature returns NULL
>> values as empty tags while according to the majority of the sources I've
>> found it should not include it in the XML response (GML2 at least, I'm not
>> sure about GML3 yet).
>>
>> If it is a bug I can work on the fix, but maybe I'm missing something.
>>
>> See:
>> http://osgeo-org.1560.x6.nabble.com/Why-the-WFS-does-not-return-the-NULL-value-field-td3802398.html
>>
>> apparently this is also what geoserver does.
>>
>> Any opinion?
>>
>> --
>> Alessandro Pasotti
>> w3:   www.itopen.it
>>
>
>

-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190123/c4162e1d/attachment.html>


More information about the QGIS-Developer mailing list