Hi, Attributes of type double can not really be nulls in shapefile. See https://desktop.arcgis.com/en/arcmap/latest/manage-data/shapefiles/geoprocessing-considerations-for-shapefile-output.htm#GUID-A10ADA3B-0988-4AB1-9EBA-AD704F77B4A2. A value -1.7976931348623158e+308 might work as a null but I do not consider it generally reliable. Use some other format as a datasource.
-Jukka Rahkonen- Lähettäjä: mapserver-users <[email protected]> Puolesta Marcin Grudzien Lähetetty: maanantai 2. elokuuta 2021 15.07 Vastaanottaja: [email protected] Aihe: [mapserver-users] WFS changing NULL values to 0. 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
_______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
