FAQ: How have shapefile dBase field mappings changed?

Question

How have shapefile dBase field mappings changed?

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 Create

Displayed in properties

Width

Precision

Min/Max Values Allowed

Short

Short

1-5

-9999*, 32767

Long

Long

1-10

-999999999**, 2147483647

Float

Float

1-6

1-6

-3.4028234664e+38, 3.4028234664e+38

Double

Double

7+

0+

-1.7976931348623158e+308, 1.7976931348623158e+308

Text

Text

1-254

254

Date

Date

10

* 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 Create

Displayed in properties

Width Requested

Width

Precision

Min/Max Values Allowed

Short

Long

1-5

5

-9999, 99999

Long

Long

1-10

10

-999999999, 2147483647

Float

Float

n/a

0

0

-3.4028234664e+38, 3.4028234664e+38

Double

Double

n/a

0

0

-1.7976931348623158e+308, 1.7976931348623158e+308

Text

Text

1-254

1-254

254

Date

Date

10

10

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.

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 Create

Displayed in properties

Width

Precision

Min/Max Values Allowed

Short

Short

1-4

-999*, 9999

Long

Long

5-10

-999999999**, 2147483647

Float

Float

1-7

1-7

-3.4028234664e+38, 3.4028234664e+38

Double

Double

8+

0+

-1.7976931348623158e+308, 1.7976931348623158e+308

Text

Text

1-254

254

Date

Date

10

* 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.

Defined

Displayed

Integer < 5

Short

Integer >= 5, < 11

Long

Integer > 10

Double

Non-zero scale, precision < 14

Float

Non-Zero scale, precision >= 14

Double

Last Published: 10/26/2018

Article ID: 000001236

Software: ArcMap 10.3.1, 10.3

Is This Content Helpful?

Yes

No

How can we make this better? Please provide as much detail as possible.