[mapserver-users] WFS changing NULL values to 0.

Marcin Grudzień mgrudzien7 at gmail.com
Mon Aug 2 05:06:38 PDT 2021


Hi,

I am publishing an SHP file via the WFS service using Mapserver 7.2.2

In some cases, attributes of a type double have NULL values in the SHP. In
such cases, MapServer is publishing them as "0" in GetFeature responses
which may be confusing to the data users. I would like to achieve a
situation that if the attribute value is NULLin SHP, the attribute is not
published in GetFeature response.

For example the response instead of this
<wfs:member>
<ms:Bazowa_pozioma>
<ms:msGeometry>
<gml:Point gml:id=".1" srsName="urn:ogc:def:crs:EPSG::2180">
<gml:pos>419591.224000 697399.714000</gml:pos>
</gml:Point>
</ms:msGeometry>
<ms:NR_PUNKTU>284301500</ms:NR_PUNKTU>
<ms:X1992>419591.224</ms:X1992>
<ms:Y1992>697399.714</ms:Y1992>
<ms:H_PLKRON86>0</ms:H_PLKRON86>
<ms:MH_PLKRON8>0</ms:MH_PLKRON8>
</ms:Bazowa_pozioma>
</wfs:member>

Should look like this
<wfs:member>
<ms:Bazowa_pozioma>
<ms:msGeometry>
<gml:Point gml:id=".1" srsName="urn:ogc:def:crs:EPSG::2180">
<gml:pos>419591.224000 697399.714000</gml:pos>
</gml:Point>
</ms:msGeometry>
<ms:NR_PUNKTU>284301500</ms:NR_PUNKTU>
<ms:X1992>419591.224</ms:X1992>
<ms:Y1992>697399.714</ms:Y1992>
</ms:Bazowa_pozioma>
</wfs:member>

Can it be achieved in MapServer?

Best regards,
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210802/ba108968/attachment.htm>


More information about the MapServer-users mailing list