Hi everyone,
I’ve been trying to add a new field to my shapefile and have been struggling to set the precision and scale. I need a Double data type with a scale of 2 and the default precision, but every time I try, I either get an error message, or the field automatically changes to Float.
I’ve tried several approaches—adding the field directly in the attribute table, using Add Field in ArcGIS Pro, and even exporting it back to a geodatabase—but the same issue persists.
I’ve read mixed information online about whether scale is supported in shapefiles, and I’m not sure what to believe at this point.
Has anyone managed to make this work, or can confirm if it’s simply not supported?
Thank you all! 🙂
Here's the dBase file spec. Seems that there are flags for precision and length. Have you hovered over the red square to see what the error is? I just added a high precision Double field to a shapefile dbf on my end so I'm wondering what the error says.
1. 2 Field Descriptor Array
| Byte | Contents | |
| 0-31 | 32 bytes | Field name in ASCII (zero-filled). |
| 32 | 1 byte | Field type in ASCII (B, C, D, N, L, M, @, I, +, F, 0 or G). |
| 33 | 1 byte | Field length in binary. |
| 34 | 1 byte | Field decimal count in binary. |
| 35-36 | 2 bytes | Reserved. |
| 37 | 1 byte | Production .MDX field flag; 0x01 if field has an index tag in the production .MDX file; 0x00 if the field is not indexed. |
| 38-39 | 2 bytes | Reserved. |
| 40-43 | 4 bytes | Next Autoincrement value, if the Field type is Autoincrement, 0x00 otherwise. |
| 44-47 | 4 bytes | Reserved. |