excel and arcmap

4
Adding X, Y Coordinate Data to a map in ArcGIS 9.x X, Y coordinates describe discrete locations on the earth's surface, and are collected using GPS devices. Once the information has been uploaded from the GPS to a computer , it is possible to map these points in the ArcGIS environment. In order to do so, the data must first be formatted to allow the software to read the coordinates of each point. ArcMap will accept a number of different formats, including DBF, delimited text, and CSV (comma-separ ated value) files. You can ha ve any number of columns in your table, but the most important thing to remember is to include columns for your coordinates. Although this example uses latitude/longitude values, it is possible to use any coordinate system to perform this operation. Step 1 Format data You r data must be specifically formatted prior to adding the X, Y coordinates to the map. If you are starting with an Excel spreadsheet, you can save directly to a text or CSV file with minimal effort. Simply ensure that your first row contains your column headings. T ry to keep the column names as simple as possible (less than 10 characters , no spaces or special characters ). Ensure that all of your data is in its corresponding column, and check that your coordinate values are numeric. This is very important – lat/long values MUST be in decimal degrees. If your data has been entered in DMS (degrees, minutes, seconds) format, it is necessary to convert to DD (decimal degrees). For example, if your lat/long values are given as 44° 15' 20'', 78° 33' 10'' respectively , these values should be converted to 44.255556, 78.552778. There are many online conversion calculators, but to ensure correct results, the conversion formula is as follows: Decimal Degrees = Degrees + ((Minutes / 60) + (Seconds / 3600)) Once your data has been correctly formatted in Excel, select all of the cells in the spreadsheet that contain data and click on File > Save As. In the Save As dialog, browse to the directory in which you wish to save your work, change the Save As Type box to read CSV, and enter a name for the document. Click Save. Data and Image Laboratory Maps, Data and Government Information Centre Thomas J. Bata Library Trent University 1

Upload: bebebrenda

Post on 14-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Excel and Arcmap

 

Adding X, Y Coordinate Data to a map in ArcGIS 9.x

X, Y coordinates describe discrete locations on the earth's surface, and are collected using GPS

devices. Once the information has been uploaded from the GPS to a computer, it is possible tomap these points in the ArcGIS environment. In order to do so, the data must first be formatted

to allow the software to read the coordinates of each point. ArcMap will accept a number of different formats, including DBF, delimited text, and CSV (comma-separated value) files.

You can have any number of columns in your table, but the most important thing to remember is

to include columns for your coordinates. Although this example uses latitude/longitude values, it ispossible to use any coordinate system to perform this operation.

Step 1 Format data

Your data must be specifically formatted prior to adding the X, Y coordinates to the map. If you

are starting with an Excel spreadsheet, you can save directly to a text or CSV file with minimaleffort. Simply ensure that your first row contains your column headings. Try to keep the column

names as simple as possible (less than 10 characters, no spaces or special characters). Ensurethat all of your data is in its corresponding column, and check that your coordinate values are

numeric. This is very important – lat/long values MUST be in decimal degrees. If your data hasbeen entered in DMS (degrees, minutes, seconds) format, it is necessary to convert to DD

(decimal degrees). For example, if your lat/long values are given as 44° 15' 20'', 78° 33' 10''respectively, these values should be converted to 44.255556, 78.552778. There are many online

conversion calculators, but to ensure correct results, the conversion formula is as follows:

Decimal Degrees = Degrees + ((Minutes / 60) + (Seconds / 3600))

Once your data has been correctly formatted in Excel, select all of the cells in the spreadsheetthat contain data and click on File > Save As. In the Save As dialog, browse to the directory in

which you wish to save your work, change the Save As Type box to read CSV, and enter a namefor the document. Click Save.

Data and Image Laboratory Maps, Data and Government Information Centre Thomas J. Bata Library Trent University 1

Page 2: Excel and Arcmap

 

Browse to your directory and open the file in Notepad. Although your results will differ slightly, the

document should appear similar to the example below; a comma-delimited text file with the firstrow containing column headings and the remaining rows containing your data. Remember that

spaces are allowed within data entries (i.e. Site 1) but not between – only commas should

separate each field.

Step 2 Add X, Y Data to ArcMap

Open ArcMap (Start > All Programs > ArcGIS > ArcMap) and choose to open a new document.

Click the Add Data button

In the Add Data dialog, you will see only the directories to which a connection has beenestablished within the software. If you are able to see the drive in which your work has been

saved, browse to the CSV document, highlight it and click Add. If you cannot see your drive, aconnection must first be established. To do so, click the Add Folder Connection button and

browse to your directory. Highlight the folder containing your files so that it appears in the textbox and click Add. The directory will then be visible in the dialog box, allowing you to access the

data and add it to the map document.

The CSV file will appear in the ArcMap Table of Contents (TOC). Note that the file must be closedin all other applications (Excel, Notepad) prior to adding it to ArcMap. If it is open in any other

application, you will most likely receive an error message.

Once your table has been added to the map, there are two methods to add X, Y data to ArcMap:

1 Right-click the table name in the TOC and choose Display XY Data:

Data and Image Laboratory Maps, Data and Government Information Centre Thomas J. Bata Library Trent University 2

Page 3: Excel and Arcmap

 

2 On the main menu, click Tools > Add XY Data

The Add XY Data dialog will open. In this dialog you will specify the fields containing your

coordinate information as well as the coordinate system of your data. An important note toremember is that the X field is your longitude, or easting field and the Y field is your latitude, or

northing field. Ensure that the correct field is entered by using the dropdown arrows. You will thenset the coordinate system information for your input coordinates. Click the Edit button. The

coordinate system you select will depend on your data. In this case we are using lat/longcoordinates that fall within the Ontario provincial boundary, and will select the North American

Datum of 1983 as our geographic coordinate system (Select > Geographic Coordinate Systems >

North America > North American Datum 1983.prj :

Click OK; your XY data should appear as points on your map.

Data and Image Laboratory Maps, Data and Government Information Centre Thomas J. Bata Library Trent University 3

Page 4: Excel and Arcmap

 

Step 3 Export data to a shapefile

Although the X, Y data is visible on your map document, it has limited functionality due to the

absence of an Object ID field in the attribute table. The Object ID field is an automatically

generated key that is maintained by ArcGIS and guarantees that each row in a table has a uniqueidentification number. The field is essential to perform key functions in ArcGIS. To create a

permanent file with an OID field, right-click the Events layer name in the TOC and choose Data >Export Data. In the dialog box, click the folder button to browse to your directory, delete theExport_Output portion of the path and enter a descriptive name. Click OK.

Once you have confirmed that your path is correct, click OK on the Export Data dialog. Click Yes

when prompted to add the exported data to ArcMap.

A new shapefile with the name you have specified is added to your directory as well as to the mapdocument. You may now remove the CSV file and the Events layer by right-clicking and choosingRemove. Your new shapefile is fully functional, and can be added to an existing map, projected, orused in geoprocessing functions.

If you wish to save your document, first click File > Document Properties and click the Data

Source Options button. Change the default setting from storing full path names to storing relativepath names. This ensures that the software will be able to locate your data in the event that it is

moved to a different drive. When this is completed, you may save your document as normal.

Data and Image Laboratory Maps, Data and Government Information Centre Thomas J. Bata Library Trent University 4