Frequently asked question

How have shapefile dBase field mappings changed?

Last Published: April 25, 2020

Answer

Changes in dBase\Shapefile Field Mappings

When creating a shapefile, the requested field types are mapped to ensure 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.

Field Mapping in ArcGIS 10.3 and earlier versions
Type Offered on CreateDisplayed in propertiesWidthPrecisionMin/Max Values Allowed
ShortShort1-5 -9999*, 32767
LongLong1-10 -999999999**, 2147483647
FloatFloat1-61-6-3.4028234664e+38, 3.4028234664e+38
DoubleDouble7+0+-1.7976931348623158e+308, 1.7976931348623158e+308
TextText1-254 254
DateDate10  
* 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.
Field Mapping in ArcGIS 10.3.1 - 10.6
Type Offered on CreateDisplayed in propertiesWidth RequestedWidthPrecisionMin/Max Values Allowed
ShortLong1-55 -9999, 99999
LongLong1-1010 -999999999, 2147483647
FloatFloatn/a00-3.4028234664e+38, 3.4028234664e+38
DoubleDoublen/a00-1.7976931348623158e+308, 1.7976931348623158e+308
TextText1-2541-254 254
DateDate1010  

At ArcGIS 10.6.1, Esri added support for scale and precision. Shapefile dBase field mappings have been changed both on creation and when viewing older files. This change was made to minimize data loss, which occurred under the previous mapping. If the precision is not specified or set to a length of zero, a Short integer defaults to Long(5) and a Long to Long(10).

Please note that in existing data, the internals do not change; only the interpretation has changed.

Field Mapping in ArcGIS 10.6.1 and later versions
Type Offered on CreateDisplayed in propertiesWidthPrecisionMin/Max Values Allowed
ShortShort1-4 -999*, 9999
LongLong5-10 -999999999**, 2147483647
FloatFloat1-71-7-3.4028234664e+38, 3.4028234664e+38
DoubleDouble8+0+-1.7976931348623158e+308, 1.7976931348623158e+308
TextText1-254 254
DateDate10  
* The min value that can be entered without truncation is -999. 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.

Reading existing data

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 preexisting shapefiles.

DefinedDisplayed
Integer < 5Short
Integer >= 5, < 11Long
Integer > 10Double
Non-zero scale, precision < 14Float
Non-Zero scale, precision >= 14Double

Article ID:000001236

Software:
  • ArcGIS Pro
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic