Adding XY Data in ArcGIS (using tabular data that has geographic coordinates)
Barbara Parmenter Last edited 2 December 2, 2007
You can add tabular data directly to a ArcGIS map if it has coordinate data for theh X and Y coordinates – examples might be well locations, data from a GPS receiver, or a table of spot height elevations. The tool for doing this is found in ArcMap, under the Tools menu function, Add XY Data.
For detailed instructions about adding tabular xy data to ArcGIS based see the ArcGIS Desktop Help under ArcMap – Creating Maps – Adding XY Coordinate Data to a Map
Tips to keep in mind when adding XY data:
• If your data is in longitude and latitude:
o The columns for the X and Y coordinates must be in decimal degrees (not degrees, minutes and seconds) – to get decimal degrees, you keep the degrees as they are, divide the minutes by 60 and the seconds by 3600 and add all these together. o The longitude coordinates for places west of the 0 meridian (e.g.., the
Americas) should be negative – often in tabular data you acquire, you will find that the longitude is given as positive. Before you attempt to use this in GIS, open it in Excel and add a field for negative longitude (e.g., long_neg) and fill it with the negative version of the positive longitude
• When you use the Tools – Add XY Data in ArcMap, you will see that the coordinate system is always listed as “undefined” – you should press the Edit button to define the coordinate system, then Select. For data that is in longitude and latitude, you would typically choose Geographic Coordinate System. If your data is in North America, choose North America, with the North American Datum 1983. If your data is somewhere else in the world, but in decimal degrees, choose World – WGS 1984. If your tabular xy data is in another coordinate system (like State Plane or UTM) choose that coordinate system.
• When the data initially comes up as points in a map, ArcGIS refers to it as an “events” layer – this is a temporary, virtual view of your tabular data. To make it into a permanent shape file which you can edit and use in analysis, export the “events” layer to a shape file by right-clicking on the points events layer, and choosing Data-Export – when the export dialog box comes up, you can choose to export the data into the data frame’s coordinate system so that it matches your other data.
Your tabular data can be in the following format (that is ArcGIS can read the following formats) – these are listed in order of ease of use within ArcGIS:
• A Microsoft Excel worksheet (formatted to be database style, with column names and data compatible with ArcGIS 9.2 (see the Tip Sheet for Working with Excel Files in ArcGIS 9.2)
• A table within a Microsoft Access database (.mdb) – to import an Excel file into Access, start a new or existing Access database and choose File – Get External Data, navigate to the file you want to import (be sure to choose .xls for the file type) then follow the instructions. This is the best and easiest way to work with tables in ArcGIS, but you do have to know something about Access to do this.
• A comma delimited text file (.csv) – most of what you read below about .dbf files also applies to .csv files – this is the second best way to work with tabular data in ArcGIS, but you will still run into some kinks. Make sure your column headings don’t have periods or spaces, and are 10 characters or less.
• A dBase table (.dbf) – see information below about saving Excel data into dBase format if you are using an earlier version of ArcGIS (not 9.2) – this will work but there are often lots of little problems - make sure your column headings don’t have periods or spaces, and are 10 characters or less. See Saving Excel files in dBase format below for more information if you are exporting from Excel to dBase.
Saving Excel files in dBase format (no longer necessary in ArcGIS 9.2 since it can read Excel files directly!)
Keep in mind the following information about Excel to dBase file conversion!! (from the Excel Help menu)
(If you are adding data in Excel to a file you have already saved once to dBase, see the important instructions at the end of this page)
The dBASE file formats DBF 2 (dBASE II), DBF 3 (dBASE III), and DBF 4 (dBASE IV) save only the text and values as they are displayed in cells of the active worksheet. All cell formatting, page layout settings, graphics, objects, and other Microsoft Excel 97 features are lost. The data displayed in the current view of a PivotTable is saved; all other PivotTable data is lost.
All rows are saved; the following numbers of columns are saved.
• DBF 2 (dBASE II) 32
• DBF 3 (dBASE III) 128
• DBF 4 (dBASE IV) 256
Text values in the first row of the range are used as dBASE field names, which are limited to 10 characters and cannot contain any spaces; subsequent characters are truncated. If the first row contains all numbers, automatic field names (N1, N2, and so on) are inserted in the converted file.
Data types of values in the first row of data in the converted range determine the data types of each field (column) of data. If the first row of data contains a blank value for a field, the field is converted as a text field, even if subsequent rows contain numbers in that field; the numbers are converted as text.
Only data visible in the worksheet cells is saved. Widen the columns in Microsoft Excel, and make sure all the data is visible before you save the sheet in dBASE format.
If cells contain decimal fractions but are formatted in Microsoft Excel with the General number format, the values are rounded to the closest whole number. To preserve numbers to the right of the decimal point, format the cells with the Number format, and then specify the number of decimal places you want saved.
If cells in the converted range contain formulas, only the resulting values of formulas are saved, even if the sheet display options are set to show formulas in the worksheet cells instead of values. To ensure that the formula values are converted correctly, click Options on the Tools menu, click the View tab, and clear the Formulas check box. Then make sure that all values are visible before you save the file. If you want to save a formula as text, insert an apostrophe (') before the formula.
Important Note - Adding new rows and columns to a previously saved dBase file in Excel
If you have used Excel to create a .dbf file, and you later want to go back and add records or columns to that .dbf file in Excel, please read the following before you save or export the modified file:
To add to an existing .dbf file in Excel, you must redefine the named range. This is because, unbeknownst to you, when you first exported the Excel file to a .dbf file, Excel created a "named range" for that .dbf file. If you do not modify this named range, Excel will continue using this original range and thus not include any added rows or columns on subsequent exports to .dbf of the same file . If you don't believe me, feel free to find out the hard way by losing all your added data!
To modify the named range to after you have added data to an existing .dbf file and before you save or export the file:
1. On the Insert menu, point to Name, and then click Define.
2. In the Names in workbook box, click the name whose cell reference you want to
change (this is "database")
3. In the Refers to box, change the reference (just change the last row and/or
column number so that it covers all your records) 4. Choose File-Save As, and save to a new .dbf (this ensures that you don't accidentally destroy your original file without being sure this process has worked)
This Content Originally Published by a land surveyor to Land Surveyors United Network