This guide was created by the staff of the GIS/Data Center at Rice University and is to be used for individual educational purposes only. The steps outlined in this guide require access to ArcGIS Pro software and data that is available both online and at Fondren Library. The following text styles are used throughout the guide: Explanatory text appears in a regular font.
Folder and file names are in italics. Names of Programs, Windows, Panes, Views, or Buttons are Capitalized. 'Names of windows or entry fields are in single quotation marks.' "Text to be typed appears in double quotation marks." |
The following step-by-step instructions and screenshots are based on the Windows 10 operating system with the Windows Classic desktop theme and ArcGIS Pro 3.2.0 software. If your personal system configuration varies, you may experience minor differences from the instructions and screenshots. |
Before beginning the tutorial, you will copy all of the required tutorial data onto your Desktop. Option 1 is best if you are completing this tutorial in one of our short courses or from the GIS/Data Center and Option 2 is best if you are completing the tutorial from your own computer.
If you are completing this tutorial from a public computer in Fondren Library and are logged on using the gistrain profile, follow the instructions below:
If you are completing this tutorial from a personal computer, you will need to download the tutorial data online by following the instructions below:
First, you will explore the XY data for this exercise that is contained in an Excel file.
This Excel worksheet provides a list of cities whose mayors signed the U.S. Conference of Mayors Climate Protection Agreement as of September 12, 2011. This list was obtained from the Climate Protection Center website at http://www.usmayors.org/climateprotection/list.asp. Notice that the worksheet also contains the latitude and longitude of the cities in decimal degrees.
Now that you have examined the tabular data in Excel, it is time to display the XY data of city locations on a map.
Note than an entire Excel file cannot be added to a map, only an individual worksheet within an Excel file. ArcGIS Pro automatically appends a $ character to the end of each Excel worksheet name. |
A new pop-up should appear titled XY Table To Point. Notice that 'Input Table' is already set to the Sheet1$ table, since that was the table used to open the tool.
Notice in the ‘Spatial Reference’ drop-down menu, it defaults to GCS_WGS_1984, which is the most commonly used geographic coordinate system for mapping latitude and longitude and happens to be the correct one to select in this case.
The points should now appear on top of the United States and the map should automatically zoom to the extent of the points, since they were the first layer added. You have successfully mapped point locations using XY coordinates.
If all of your data already comes with a list of the latitudes and longitudes of the points you’d like to map, then you are ready to go straight into ArcGIS Pro, but what if you have a list of cities or addresses that you’d like to map, but you don’t know their corresponding coordinates? This section will show you one automated method of generating such coordinates based on address locations.
On the actual Climate Protection Center website, only the city is listed for each participating mayor. First, you will explore the data for this exercise that is contained in an Excel file.
Notice this file is identical to the worksheet you used earlier to map the participating city locations, except that it is missing the latitude and longitude information. In such an instance where you would like to map these cities, you would first have to obtain their coordinates, so you will use an online geocoder. There are many online geocoders, but the one you will be using in this course is called GPSVisualizer. For your future reference, a list of geocoders is maintained by Texas A&M University GeoServices at http://geoservices.tamu.edu/Services/Geocode/OtherGeocoders/.
Here, you will see several options for geocoding addresses. Option 2 allows you to geocode multiple addresses and should be used for standard street addresses, but Option 3 allows you to geocode simple locations and is recommended if you are mapping data such as ZIP codes, cities, or states. Since your data table only contains city names, you will use option 3.
Once the website is finished geocoding your cities, the latitudes and longitudes will be displayed.
A delimiter is simply a character, such as a tab, space, or comma that tells Excel when to move the text into the next column.
You could now delete any unnecessary columns and save this Excel worksheet to map the XY coordinates just like you did in the first exercise.
Occasionally, you will come across latitude and longitude coordinates listed in Degrees, Minutes, Seconds (DMS) format (27°52'35.1" N, 93°48'54.1" W). However, ArcGIS requires coordinates to be in decimal degrees (DD) format (27.3574, -93.75346). This section will show you how to convert coordinates from DMS to DD using Excel.
This Excel worksheet contains the coordinates of all the buoys located in the Flower Garden Banks National Marine Sanctuary. The coordinates were obtained from http://flowergarden.noaa.gov/visiting/buoyboundary.html. This dataset provides a perfect example of when it would be absolutely necessary to map point locations using XY coordinates. In the middle of the ocean, there are no physical landmarks or addresses, so location data must be collected using latitude and longitude.
Before you can covert DMS coordinates to DD coordinates, it is necessary to separate out the degrees, minutes, and seconds components into their own columns. In Excel, you can divide single cells into multiple columns using either delimiters or fixed width break lines. You will try both methods.
Notice that everywhere the delimiter (in this case, the degree symbol) used to be located, the data has now been split into another column and the delimiter has disappeared.
You could repeat this same process twice more, using the apostrophe symbol (‘) and the quotation marks symbol (“) as the respective delimiters. If your coordinates data had differing numbers of decimal places in each row, repeating this method would be necessary, but, in this case, each set of coordinates has exactly the same number of characters, so using fixed width break lines is possible.
If a break line is in the wrong location, you can click and hold and drag it to a new location. If you need to delete a break line, you can double-click on it.
Your spreadsheet should now appear like that shown below. If you have any additional columns, showing because they were not marked to be skipped, delete them now.
Now that your degrees, minutes, and seconds components are each in their own column, you can use the following formula to convert them into decimal degrees: DD = D+(M/60)+(S/3600).
Hover your cursor over the small black box in the bottom right corner of the highlighted cell as shown below. Notice that your cursor changes from a thick white cross to a thin black cross.
Your longitude coordinates are now in decimal degrees format; however, the cells currently contain formulas, which cannot be read by ArcGIS. To solve this problem, you will copy the values of the equations to a new column.
Click cell G2 and notice the formula bar contains a formula. Click cell H2 and notice the formula bar contains the actual numeric value of the formula. Since ArcGIS will be using the values you have just pasted in column H, you no longer need columns D through G.
If you wish to test yourself on what you have just learned, insert many columns between column C and column D and practice converting the latitude field from DMS to DD format.
The following section is optional and does not contain additional information on mapping locations using XY coordinates. The Spatial Join tool is also covered in the Introduction to Geoprocessing tutorial. |
At this point, all of the cities appear on the map, but there are many urban areas that are so densely covered with overlapping points that it becomes difficult to tell exactly how many points there are and to see the underlying data, such as city and state names. In addition, while you can see the spatial distribution of the points, you are not provided with any sort of useful summary of the data. Performing a spatial join will allow you to discover how many participating cities are located in each state, or even county.
Notice that the ClimateProtectionAgreementCities feature class you just exported is now contained in this geodatabase.
You will now examine the US_States layer’s attribute table.
The goal of performing a spatial join is to add a numeric field to the end of this attribute table that tells you how many participating cities are contained within each state.
The Spatial Join tool will open within the Geoprocessing pane. For 'Target Features', the US_States layer is already selected, since that is the layer from which you launched the tool.
The 'Field Map of Join Features' describes how the features will be summarized as they are joined. The first half of the list of fields displays the attributes of the states layer, ending with the Shape_Area field. The second half of the list of fields, beginning with the Latitude field, displays the attributes of the cities layer. A count field indicating how many city points intersect with each state will automatically be provided. Since many cities will be appended to each state, it does not make sense to generate summary statistics about the city fields, because variables like latitude, longitude, and name cannot be averaged. By default, the table would output only the attributes of the first city encountered within each state, which could be very misleading. Therefore, you will remove all the city attributes from the output fields.
Hypothetically, if your cities layer contained an attribute listing the population of each participating city, then, when performing the spatial join, you could use the Sum Merge Rule on the population field to calculate the total population residing in participating cities in each state and then calculate what percentage of the state’s total population reside in these participating cities. In this case, you do not have such population data available, so you will stick with the default Join Count attribute.
The new layer should appear at the top of your Contents pane.
Since the new layer contains all of the same information as the old US_States layer, plus the new Join_Count field, you no longer need the US_States layer.
You can now easily tell which states have the largest number of participating cities, though this display does not take into consideration things such as city density and population density or the percentage of the total state population participating.