[GIS] ArcGIS Add XY data cannot specify x and y fields

arcgis-desktoparcmap

I have imported numerous CSV files into ArcGIS before using the "Add XY Data" dialog box. Sometimes I run into a problem where I can select the table, but then the drop-down menus to specify the X, Y, and Z fields are blank, where they would usually display a column header like "Longitude" (see picture below).

I'm running into this problem now. The CSV table has a header row, but nothing shows up in the Add XY data dialog box field specification, so I cannot add the data to ArcGIS. I've also tried importing the table and displaying as XY data, but the problem persists. This has happened in ArcMap versions 10.2 and 10.3.

Any ideas why Arc can't find XY fields? Could special characters in the table create this problem?

enter image description here

Here's a sample of the data:

Sample of data

Best Answer

The problem is likely due to a data typing problem.

ArcGIS assigns data types by looking at some number of the first few rows. If it reads the lat and lon attributes and finds "NA" in them, it will assume they are text and not valid numeric fields to be used for x and y coordinates.

Go through and replace all of the 'NA' entries, with blank. This will set them to NoData, as opposed to an ''. Also, you will end up with only a few points displayed since you are missing one or both of the coordinates in many cases.

Here is Esri's help topic for reference: Adding x,y coordinate data as a layer

Related Question