Exercise 4: Displaying and querying route events

Complexity: Beginner Data Requirement: ArcGIS Tutorial Data Setup Goal: Display and query route events

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.

Steps:
  1. Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.
  2. Click File > Open.

  3. Click the Look in drop-down arrow on the Open dialog box and navigate to the location where you created the \MyLR folder.
  4. Double-click Ex4.mxd.

    Opening Ex4.mxd

    The map opens.

  5. Click the List by Source view in the table of contents.
  6. 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.

Steps:
  1. Click Geoprocessing > Search For Tools.

    The Search window opens.

  2. Type Make Route Event Layer in the search box.
  3. Click Search Tools.

    The Search window lists tools that are related to the search string you entered.

  4. Click the Make Route Event Layer tool in the search results.
  5. Click the Input Route Features drop-down arrow and click routes_hwy.
  6. Click the Route Identifier Field drop-down arrow and click ROUTE1.
  7. Click the Input Event Table drop-down arrow and click accident.
  8. Click the Route Identifier Field drop-down arrow and click ROUTE1.
  9. Click the Event Type drop-down arrow and click POINT.
  10. Click the Measure Field drop-down arrow and click MEASURE.
  11. Type accident Eventsin the Layer Name text box.
  12. Click OK.

A new layer—accident Events—has been added to your map.

Shows the Accident events displayed in the 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.

Steps:
  1. Click Geoprocessing > Search For Tools.

    The Search window opens.

  2. Type Make Route Event Layer in the search box.
  3. Click Search Tools.

    The Search window lists tools that are related to the search string you entered.

  4. Click the Make Route Event Layer tool in the search results.
  5. Click the Input Route Features drop-down arrow and click routes_hwy.
  6. Click the Route Identifier Field drop-down arrow and click ROUTE1.
  7. Click the Input Event Table drop-down arrow and click pavement.
  8. Click the Route Identifier drop-down arrow and click ROUTE1.
  9. Click theEvent Type drop-down arrow and click LINE.
  10. Click the From-Measure Field drop-down arrow and click BEGIN_MP.
  11. Click the To-Measure Field drop-down arrow and click END_MP.
  12. Type pavement Eventsin the Layer Name text box.
  13. 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.

Steps:
  1. Click Selection > Select By Attributes.

    Selection, select by attribute
  2. Click the Layer drop-down arrow and click accident Events.
  3. Scroll down and double-click NUM_INJURY in the Fields list.
  4. Click the greater than operator (>).
  5. Click Get Unique Values.
  6. Double-click 0 in the Unique Values list.

    "NUM_INJURY" > 0 is the expression that appears in the text box.

  7. Click Apply.

    You will see a number of the features in the accident Events layer selected in the ArcMap display window.

  8. Click the Layer drop-down arrow and click pavement Eventson the Select By Attributes dialog box.
  9. Type "RATING" < 50 in the text box.
    Select By Attributes on the Pavement Events layer
  10. Click Apply.
  11. 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

Steps:
  1. Click Geoprocessing > Geoprocessing Options.

    Accessing the GP options dialog
  2. Check Add results of geoprocessing operations to the display.
    Shows the GP options dialog
  3. Click OK.

Intersecting event layers

Steps:
  1. Click Geoprocessing > Search For Tools.

    The Search window opens.

  2. Type Overlay Route Events in the search box.
  3. Click Search Tools.

    The Search window lists tools that are related to the search string you entered.

  4. Click the Overlay Route Events tool in the search results.
  5. Click the Input Event Table drop-down arrow and click the accident Events layer.
  6. NoteNote:

    Because you chose an event layer, the Route Identifier Field, Event Type, and Measure Field values were set automatically. If you had chosen an event table, you would be responsible for setting these parameters.

  7. Click the Overlay Event Table drop-down arrow and click the pavement Events layer.
  8. Click the Type of Overlay drop-down arrow and click INTERSECT.

    This allows you to find the intersecting event layers.

  9. Type C:\MyLR\AccPav.dbf for the value of the Output Event Table parameter.
  10. Keep the remaining defaults.

  11. Click OK to execute the tool.
  12. 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

Steps:
  1. Click Geoprocessing > Search For Tools.

    The Search window opens.

  2. Type Make Route Event Layer in the search box.
  3. Click Search Tools.

    The Search window lists tools that are related to the search string you entered.

  4. Click the Make Route Event Layer tool in the search results.
  5. Click the Input Route Features drop-down arrow and click the routes_hwy layer.
  6. Click the Route Identifier Field drop-down arrow and click ROUTE1.
  7. Click the Input Event Table drop-down arrow and click AccPav.
  8. Click the Route Identifier Field drop-down arrow for the event table and click ROUTE1.
  9. Click OK.

    The AccPav events layer is added to the contents.

  10. 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.


Published 6/7/2010