In this exercise, you will create a new event table that represents where injury accidents occurred along sections of poor-quality pavement.
To do this, you will first use the Make Route Event Layer tool to display the accident location and pavement quality event data on your map. You will then use the Select By Attributes dialog box to select the injury accidents and poor-quality pavement locations. You will use the Overlay Route Events tool to create a new event table whose records represent where injury accidents occurred along poor-quality pavement. Finally, you will add these events to the ArcMap display.
If you have not completed Exercise 2 Creating and calibrating route data, open ArcCatalog. Within the table of contents, delete PITT.gdb in your \MyLR folder and rename PITT_Results.gdb to PITT.gdb.
Opening an existing map document
To begin this exercise, you will start ArcMap and open an existing document.
- Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.1.
- Click File > Open.
- Click the Look in drop-down arrow on the Open dialog box and navigate to the location where you created the \MyLR folder.
- Double-click Ex4.mxd.
The map opens.
- Click the List by Source view in the table of contents.
This map contains the following layers in a data frame called Pitt County:
routes_hwy | Shapefile copy of routes_new feature class you created in Exercise 2 Creating and calibrating route data |
county boundary | Pitt County boundary |
accident | Point event table storing accident information |
pavement | Line event table storing pavement information |
base_roads | All the roads in Pitt County |
Displaying point events on your map
The accident table is a point event table. Point events occur at a precise point location along a route. In this section of the exercise, you will display the accident event data as a layer.
- Click Geoprocessing > Search For Tools.
The Search window opens.
- Type Make Route Event Layer in the search box.
- Click Search Tools.
The Search window lists tools that are related to the search string you entered.
- Click the Make Route Event Layer tool in the search results.
- Click the Input Route Features drop-down arrow and click routes_hwy.
- Click the Route Identifier Field drop-down arrow and click ROUTE1.
- Click the Input Event Table drop-down arrow and click accident.
- Click the Route Identifier Field drop-down arrow and click ROUTE1.
- Click the Event Type drop-down arrow and click POINT.
- Click the Measure Field drop-down arrow and click MEASURE.
- Type accident Events in the Layer Name text box.
- Click OK.
A new layer—accident Events—has been added to your map.
Displaying line events on your map
The pavement table is a line event table. Line events differ from point events in that they have two measure fields that define a portion of a route. The procedure for adding line events to your map is almost the same as adding point events.
- Click Geoprocessing > Search For Tools.
The Search window opens.
- Type Make Route Event Layer in the search box.
- Click Search Tools.
The Search window lists tools that are related to the search string you entered.
- Click the Make Route Event Layer tool in the search results.
- Click the Input Route Features drop-down arrow and click routes_hwy.
- Click the Route Identifier Field drop-down arrow and click ROUTE1.
- Click the Input Event Table drop-down arrow and click pavement.
- Click the Route Identifier drop-down arrow and click ROUTE1.
- Click the Event Type drop-down arrow and click LINE.
- Click the From-Measure Field drop-down arrow and click BEGIN_MP.
- Click the To-Measure Field drop-down arrow and click END_MP.
- Type pavement Events in the Layer Name text box.
- Click OK.
A new layer—pavement Events—has been added to your map.
You might have to use the Zoom tool to zoom in on the map to see the pavement events, or you could click and move the pavement Events layer to the top of the layer list in the table of contents.
Querying events
Layers based on an event table can be queried in many ways. They can be identified by clicking them, selected by dragging a box or clicking them on the map, selected by clicking them in an attribute table, and selected using a Structured Query Language (SQL) expression. You will use the Select By Attributes dialog box to input expressions to select the event records needed for this exercise. Specifically, you will select injury accidents and poor-quality pavement.
- Click Selection > Select By Attributes.
- Click the Layer drop-down arrow and click accident Events.
- Scroll down and double-click NUM_INJURY in the Fields list.
- Click the greater than operator (>).
- Click Get Unique Values.
- Double-click 0 in the Unique Values list.
"NUM_INJURY" > 0 is the expression that appears in the text box.
- Click Apply.
You will see a number of the features in the accident Events layer selected in the ArcMap display window.
- Click the Layer drop-down arrow and click pavement Events on the Select By Attributes dialog box.
- Type "RATING" < 50 in the text box.
- Click Apply.
- Click Close.
Now both the accident and pavement events are selected on your map. To see this more clearly, you may want to uncheck and check the accident Events and pavement Events layers in the table of contents.
In the next section of this exercise, you will use the Overlay Route Events tool to intersect the two event layers. The result will be a table that contains the injury accidents that happened on poor-quality pavement. All attributes from both inputs are maintained. First, however, you need to be sure that your geoprocessing results are automatically added to your display.
Setting geoprocessing results to display automatically
- Click Geoprocessing > Geoprocessing Options.
- Check Add results of geoprocessing operations to the display.
- Click OK.
Intersecting event layers
- Click Geoprocessing > Search For Tools.
The Search window opens.
- Type Overlay Route Events in the search box.
- Click Search Tools.
The Search window lists tools that are related to the search string you entered.
- Click the Overlay Route Events tool in the search results.
- Click the Input Event Table drop-down arrow and click the accident Events layer.
- Click the Overlay Event Table drop-down arrow and click the pavement Events layer.
- Click the Type of Overlay drop-down arrow and click INTERSECT.
This allows you to find the intersecting event layers.
- Type C:\MyLR\AccPav.dbf for the value of the Output Event Table parameter.
- Keep the remaining defaults.
- Click OK to execute the tool.
- The AccPav.dbf table is added to the ArcMap session. If you cannot see it in the table of contents, click the List by Source button in the Table of Contents window.
Displaying the intersected event results
- Click Geoprocessing > Search For Tools.
The Search window opens.
- Type Make Route Event Layer in the search box.
- Click Search Tools.
The Search window lists tools that are related to the search string you entered.
- Click the Make Route Event Layer tool in the search results.
- Click the Input Route Features drop-down arrow and click the routes_hwy layer.
- Click the Route Identifier Field drop-down arrow and click ROUTE1.
- Click the Input Event Table drop-down arrow and click AccPav.
- Click the Route Identifier Field drop-down arrow for the event table and click ROUTE1.
- Click OK.
The AccPav events layer is added to the contents.
- Uncheck the accident Events and pavement Events layers in the contents.
You see only the injury events that occurred along poor-quality pavement. Each of these new events has all the attributes from both the accident and pavement tables.