0

I am importing a .txt file into ArcMap (10.4.1). It all works fine, apart from the fact that when I open the table in ArcGIS it says the fields are string, when they should be numeric [please see image below].

enter image description here

The original .txt file looks like this: enter image description here

How can I make sure that the values are numeric, and not strings?

2

3 Answers 3

5

If you use the Table to Table tool, you can see how the fields are being imported in the Field Map parameter and change them accordingly by right clicking and changing properties. Probably not the most efficient way, but it should work.

Alternatively, you could read the table into excel and play with the field types there first (link)

0

One alternative way, perhaps not the best, would be to format your numbers to look more like numbers. For example:

328197,20,13

can confuse the importer. So try adding decimal values:

328197.0,20.0,13.0

This should only need to be done on the first row of data as well if it's too much hassle to universally add decimal values.

Field1,Field2,Field3
328197.0,20.0,13.0
328198,39,13
...
-1

Change the file extension from .txt to .csv. CSV is more uniformly recognized than txt and GIS can correctly interpret the values.

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.