Is This Content Helpful?
We're glad to know this article was helpful.
How have shapefile dBase field mappings changed?
Changes in dBase\Shapefile Field Mappings
When creating a shapefile, the requested field types are mapped to ensure that the data can transfer to other data formats and into ArcObjects without overflow or truncation. Because of this, there is no guarantee that the requested field type will be created. The "best fit" is created to eliminate any chance of data loss.
The field mapping used with dbase\shapefiles was changed, beginning at ArcGIS 10.3.1, to resolve a data truncation problem. In short integer fields, numbers like -12345 would be truncated to -1234. In long integer fields, numbers like -1234567890 were truncated to -123456789. The numbers are stored in the dBASE file as text and there is no allowance made for negative numbers. The excess precision was truncated without warning or error.
The mappings are enforced on creation and on insert/update by ArcObjects, arcpy, and through the user interface. Existing shapefiles are not changed and maintain their mappings. Operations that create new shapefiles use the new mappings. Performing a copy/paste operation on a shapefile is a file-based process and does not update the mappings.
|Type Offered on Create||Displayed in properties||Width||Precision||Min/Max Values Allowed|
* The min value that can be entered without truncation is -9999. A true short integer has a min of -32768. ** The min value that can be entered without truncation is -999999999. A true long integer has a min of -2147483648.
|Type Offered on Create||Displayed in properties||Width Requested||Width||Precision||Min/Max Values Allowed|
Esri is reviewing how to add back support for scale and precision in a future release of ArcGIS. Any plans or updates will be posted in this technical article. Shapefile dBase field mappings have been changed both on creation and when viewing older files. This change was made to minimize data loss, which had been occurring under the old mapping. Please note that in existing data, the internals do not change; only the interpretation has changed.
When reading existing data, the best fit to the new mapping is attempted. Nothing changes in the data, but the field type may be reported differently. Precision and type are used to determine the mapping, and precision/scale are displayed on pre-existing shapefiles.
|Integer < 5||Short|
|Integer >= 5, < 11||Long|
|Integer > 10||Double|
|Non-zero scale, precision < 14||Float|
|Non-Zero scale, precision >= 14||Double|