1

I am trying to import a CSV into a DBF using ArcCatalog (10.1). In the field map, pictured below, I can only set an ID field to Long, Text, Double, etc. But there is no Numeric type as in DBF and shapefile attributes.

If I import the ID field as a Long, values will be truncated. If I import it as Text, it will be different type than Numeric. In either case, I won't be able to join the imported DBF to a shapefile with the ID.

How should I choose the type so that the ID in the imported DBF can be joined with a 'Numeric' ID in shapefiles?

enter image description here

5
  • Can you edit your question to include an example of an ID field that gets truncated as Long, please? When I look at a shapefile I see IDs that have a Number Format of Numeric but their Data Type is Long so I am struggling to understand the precise steps you have taken to reach a problem with this. A more detailed description would be best to start with the first row of your CSV (just a couple of fields).
    – PolyGeo
    Commented Nov 9, 2014 at 8:36
  • Also, if you have not already reviewed Preparing CSV files for use in ArcGIS for Desktop?, I think that would be wise to do.
    – PolyGeo
    Commented Nov 9, 2014 at 8:44
  • @PolyGeo Thanks for the pointers. I looked again, and actually the data wasn't truncated. It's just that some values are bigger (1477701) and others are smaller (203071). I thought I had a truncation issue when I saw the small values in DBF and the large values from the shapefile they are supposed to match.
    – tinlyx
    Commented Nov 9, 2014 at 8:44
  • @PolyGeo Also, I ended up importing the field as Double and it just showed in DBF as Numeric. I will delete my question after you see this.
    – tinlyx
    Commented Nov 9, 2014 at 8:46
  • Rather than delete your question I would recommend that you write a short (about a paragraph) answer to summarize the solution. Self-deletion of questions can be done but they can be viewed negatively by some of the site's algorithms.
    – PolyGeo
    Commented Nov 9, 2014 at 8:53

1 Answer 1

1

I took a closer look and actually the data wasn't truncated. It's just that some values are bigger (1477701) and others are smaller (203071). I thought I had a truncation issue when I saw the smaller values in the first page of the DBF and the large values from a segment of the attribute table of the shapefile they are supposed to match.

On a different note regarding the "No numeric field" issue, I know that DBFs save numerical values in decimal text forms of the Numeric type, and I got worried when I didn't see this option in ArcCatalog table-to-table importer's field types (i.e. when right click on CSV and export). What I did eventually is to import the CSV field as a Double as in the OP picture, and the field ended up in DBF as a Numeric field in ArcGIS. And this imported Numeric field matches OK with the Numeric field in the target shapefile it is supposed to match.

I suppose this is a good solution as importing integers as Double didn't introduce any imprecision like 3.000000001 and the imported values in DBF compare well with the values in shapefiles.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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