<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Attributes of type double can not really be nulls in shapefile. See
<a href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/shapefiles/geoprocessing-considerations-for-shapefile-output.htm#GUID-A10ADA3B-0988-4AB1-9EBA-AD704F77B4A2">
https://desktop.arcgis.com/en/arcmap/latest/manage-data/shapefiles/geoprocessing-considerations-for-shapefile-output.htm#GUID-A10ADA3B-0988-4AB1-9EBA-AD704F77B4A2</a>. A value
</span><span lang="EN-US">-1.7976931348623158e+308 might work as a null but I do not consider it generally reliable. Use some other format as a datasource.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> mapserver-users <mapserver-users-bounces@lists.osgeo.org>
<b>Puolesta </b>Marcin Grudzien<br>
<b>Lähetetty:</b> maanantai 2. elokuuta 2021 15.07<br>
<b>Vastaanottaja:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> [mapserver-users] WFS changing NULL values to 0.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am publishing an SHP file via the WFS service using Mapserver 7.2.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For example the response instead of this <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><wfs:member><br>
<ms:Bazowa_pozioma><br>
<ms:msGeometry><br>
<gml:Point gml:id=".1" srsName="urn:ogc:def:crs:EPSG::2180"><br>
<gml:pos>419591.224000 697399.714000</gml:pos><br>
</gml:Point><br>
</ms:msGeometry><br>
<ms:NR_PUNKTU>284301500</ms:NR_PUNKTU><br>
<ms:X1992>419591.224</ms:X1992><br>
<ms:Y1992>697399.714</ms:Y1992><br>
<span style="color:red"><ms:H_PLKRON86>0</ms:H_PLKRON86><br>
<ms:MH_PLKRON8>0</ms:MH_PLKRON8></span><br>
</ms:Bazowa_pozioma><br>
</wfs:member><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Should look like this<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><wfs:member><br>
<ms:Bazowa_pozioma><br>
<ms:msGeometry><br>
<gml:Point gml:id=".1" srsName="urn:ogc:def:crs:EPSG::2180"><br>
<gml:pos>419591.224000 697399.714000</gml:pos><br>
</gml:Point><br>
</ms:msGeometry><br>
<ms:NR_PUNKTU>284301500</ms:NR_PUNKTU><br>
<ms:X1992>419591.224</ms:X1992><br>
<ms:Y1992>697399.714</ms:Y1992><br>
</ms:Bazowa_pozioma><br>
</wfs:member><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Can it be achieved in MapServer?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Marcin<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>