I'm adding a short integer field to a shapefile but when I go to properties it says it is a long integer.

3098
5
09-20-2016 08:31 AM
Highlighted
New Contributor

I'm using ArcGIS10.4.1 Desktop.  A coworker was adding a field to a shapefile, specifying short integer.  When she went to properties of that field it says it is a long integer.  When trying to use the Simple Data Loader, the field types must match.  I need the field to be a short integer but it comes up as a long integer.

I've tried adding a field to a different random shapefile and it also says Long integer when I specified the field to be a Short.

Reply
0 Kudos
5 Replies
Highlighted
MVP Notable Contributor

Rachel,

Can you use a file geodatabase instead of a shapefile? I have a feeling that the issue lies within the database of the shapefile.

Highlighted
New Contributor

Thank you Adrian. That worked.  I still wonder why adding a short integer to two completely different shapefiles creates a long integer.  I sent a message to a friend in Utah and she had the same issue, adding a short integer to a shapefile for her created a long integer.

Reply
0 Kudos
Highlighted
MVP Notable Contributor

Rachel, I am wondering if the shapefile only had one kind of integer and that was just the 'long' variety. Maybe when the geodatabase came around, then it was introduced with more than one type of integer. 

From digging around, I found this old article on when to use a shapefile, etc. 

Geoprocessing considerations for shapefile output 

It looks like that the long and short integers in a shapefile (dBase format) are just "numbers". Same goes for float and double (they're both "float").

So maybe it's best to stick with geodatabases for things like this.

Highlighted
MVP Esteemed Contributor

This issues is recognized... see Lance Shipman's explanation and the subsequent discussion in this thread...

https://community.esri.com/message/563871?commentID=563871#comment-563871 

Highlighted
MVP Notable Contributor

This link will jump you straight to the comment:

https://community.esri.com/thread/159997?commentID=563871#comment-525506 

Interesting behavior in 10.3.1. 

Just to be neurotic about it, here is Lance's copied and pasted comment (it's great info):

What you are seeing is a change to the behavior of dBase/Shapefiles introduced at 10.3.1. Normally a Short Integer can hold numbers from -32767 to +32767, but dBase doesn't store a Short. It stores an N type. Prior to 10.3.1 a Short was defined as a N 4. An N 4 can hold numbers from -999 to 9999. Not the full range of a Short. At 10.3.1 the Short definition (or our mapping of it) was changed to N 5 to allow a range of -9999 to +32767. In your case this changed the definition of a N 5, previously mapped as a Long, to a Short. This was change to fix a problem with silent truncation of -9999 to -999 in Short integer fields and to update the range allowed to be closer to what is normally allowed in a Short. This had some unintended consequences that we will be correcting in 10.4.

I wonder if those issues have been corrected in 10.4 or 10.4.1 (I still have 10.3.1 installed....)

Reply
0 Kudos