ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Exercise 4: Displaying and querying route events

  • Opening an existing map document
  • Displaying point events on your map
  • Displaying line events on your map
  • Querying events
  • Setting geoprocessing results to display automatically
  • Intersecting event layers
  • Displaying the intersected event results
Complexity:
Beginner
Data Requirement:
ArcGIS Tutorial Data for Desktop
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.

  1. Start ArcMap.
  2. Click File > Open.
    Click 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:

    Layer nameDescription

    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.

  1. Click Geoprocessing > Search For Tools.

    The Search window opens.

  2. Type Make Route Event Layer in the search box.
  3. Search for make route event layer geoprocessing tool
  4. Click Search Tools.

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

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

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.

  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 the Event 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 Events in the Layer Name text box.
  13. Click OK.
  14. Make route event layer tool

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

You might have to use the Zoom In tool to zoom in on the map to see the pavement events.

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.

  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.
    Select By Attributes dialog box

    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 Events on 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

  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

  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. Note:

    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.
    Overlay route events
  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.
    List By Source view

Displaying the intersected event results

  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.

    Make route event layer

    The AccPav events layer is added to the contents.

    Events layer added to table of 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.

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal