3

I have a tab-delimited table. The file is a .txt file with the .tab extension. The rows are:

Dataset Feature_Class_or_Table  Field   GLOBALID    New_Value   Bad_Character
GasDataset  CasingAnno  TEXTSTRING  {5A5B2C4B-F395-4AD2-BEB8-D1AB3D61DDC2}  3/4 -4  new line, carriage return
GasDataset  CasingAnno  TEXTSTRING  {832D9957-CEA2-4DDE-801A-4A12F286681C}  2 PL-34 new line, carriage return
GasDataset  CasingAnno  TEXTSTRING  {66441560-5EF1-4572-B13B-F7C4970CD2C1}  2 PL-30 new line, carriage return
GasDataset  CasingAnno  TEXTSTRING  {EF2B66AF-E957-47AA-A23F-1334E085C5A4}  1 1/2 PL    new line, carriage return

However, when ArcGIS 10.1 for Desktop reads the table, it adds a couple new fields; New_Value_X and New_Value_Y.

enter image description here

Is there a way to prevent the reading/creation of these two fields?

Emil Brundage
  • 13,859
  • 3
  • 26
  • 62

1 Answers1

5

I believe ArcGIS is grabbing the closest thing to a possible coordinate and converting it into two columns. With your first row for new_value being two separated numbers, even though not actual coordinates, ArcMap decided that that should be separated into an x and y column (new_value_x and new_value_y). By switching the order of your data, and moving that row down, I was able to import the table by 'Add Data' and not get the *_x, *_y columns.

A few solutions include manually manipulating the data, programatically wrapping strings in quotes, creating a header with dummy data for programatically loading in ArcMap that is easily stripped out later, etc.

For a little background on what is happening, here is a help page from ArcGIS

If your delimited text file contains data coordinate information, such as x,y data, ArcGIS will recognize the coordinate information as numeric fields which can be used to either display your information as a layer or as input to tasks, such as geocoding. In the example above, the coordinate information was straightforward and easy to recognize; it was contained in fields called x and y. This won't always be the case and, in many instances, the information you want to use within ArcGIS may be stored in any number of different formats.

If this is the case, such as when the coordinate information is stored within a text field or is stored in degrees, minutes, and seconds (for example, -120 13 58), the information will be converted and displayed to you in Decimal Degrees (DD) for use in ArcGIS. In the case of single-field formats, such as UTM, ArcGIS will maintain the original UTM field but add two additional fields appended with _X and _Y and display the coordinate information in Decimal Degrees. For example, if you have a text field called UTM, when opening the text file, you will see three fields called UTM, UTM_X, and UTM_Y. In the case of double-field fields, such as Lat/Lon, when these fields are identified as text fields, ArcGIS will maintain the original fields and add two new fields to contain the converted Decimal Degree coordinate information.

Also, if you are just looking to convert a mapinfo tab file to shapefile, you may want to look at this question.

MaryBeth
  • 3,694
  • 24
  • 41