﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30020	Support reading null values for numeric fields on Shapefile import via LayerMapping	Kathryn Killebrew	Kathryn Killebrew	"On reading a Shapefile into a model object via `LayerMapping`, set numeric field value to `None` instead of zero if the model field is nullable and input field value is either null or unset. Currently, both nulls and zeroes in the input are stored as zeroes.

Shapefiles do not officially support storing nulls:
http://resources.esri.com/help/9.3/ArcGISDesktop/com/Gp_ToolRef/geoprocessing_tool_reference/geoprocessing_considerations_for_shapefile_output.htm

However, on inspecting the DBF contents via `ogrinfo` with GDAL 2.1 or 2.2, both zeroes and nulls display, so some unofficial support exists.

GDAL 2.2 added support for distinguishing between ""unset"" fields and those explicitly set to null:
https://trac.osgeo.org/gdal/wiki/rfc67_nullfieldvalues

Adding null support should be possible by either checking before casting the value with OGR `IsFieldSetAndNotNull` on GDAL 2.2+ or checking with OGR `IsFieldSet` on older GDAL versions:
https://www.gdal.org/classOGRFeature.html#a260b925400b72914eb1b8cc9a3bf4029
"	New feature	closed	GIS		Normal	fixed	GIS, GEOS, LayerMapping	claude@…	Ready for checkin	1	0	0	0	0	0
