3

I have a shapefile that has an ID field(type=double, precision=15, scale=0). I am trying to add a new field(ID_2) that has the same field attributes as ID(Double,15,0). However, when I add the ID_2 field it seems like the new ID_2 field is being rounded to a precision=12.enter image description here

I've tried adding the new field both manually within ArcMap Desktop 10.5 and also using the Add Field tool in a Python script; both methods result in the ID_2 field being rounded and the last 3 digits replaced with zero's. I also imported the same streets shapefile into a file geodatabase, added the ID_2 field, and calculated from the ID field, and that worked exactly as I would expect.

Also strange is if I right-click on the new ID_2 field and go to Properties, it shows the Precision=0.enter image description here

Does anyone have any idea why my Double field isn't being added with a precision of 15, and is instead seemingly being rounded, chopping off the last 3 digits of the ID?

  • 2
    How did you calculate ID_2 to be the "same" as ID? – PolyGeo Feb 1 '17 at 23:01
  • 1
    There's more than one numeric type in a dBase file. ArcGIS only uses one of them for write, and I don't think that format supports a 15 width. Floating-point values make unreliable identifiers for this reason. – Vince Feb 2 '17 at 1:56
  • With numbers that large I'd convert to text, for one of the reasons mentioned by @Vince above, create a text field for ID_2 and use field calculator to cast the numerals to string str([ !ID! ]) with Python. These are unique IDs that do not need to be numeric as the values will not be used in any analysis. Thay are simply an identifier. – Clubdebambos Feb 2 '17 at 7:44
  • @PolyGeo I right-clicked on the ID_2 field header and used Field Calculator (ID_2 = !ID!). – mtbnski Feb 2 '17 at 14:03
  • I am using TomTom shapefile street data which comes with the ID field as (Double, 15,0) which is displayed properly as shown in my screenshot above, so ArcMap can display a double field with 15 digits. I tried the exact same steps (adding ID_2 field and populating from ID) with the same data on a different computer running ArcMap 10.3 and ID_2 was calculated correctly with 15 digits. Either there is a bug in 10.5 or my ArcMap needs to be reinstalled. – mtbnski Feb 2 '17 at 14:14
2

This is a known ESRI bug, which has existed since 10.4. The original bug (BUG-000095512) was determined to be "by design" and was closed. It still exists in 10.5 and enough people have complained that ESRI has reopened the case under BUG-000099718. The links may require you to have an ESRI account, so here is a screenshot of BUG-000099718. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.