Lab Assignment 3

advertisement
Assignment 3
Autumn 2013
Using the Geodatabase Schema – Advanced Modeling
Due Date: Oct 19, 2013
Sections AA and AB:
Assignment Data:

Assignment 3 data from P:\geog482\labAssignment3\data\
Deliverables:
A completed answer sheet, answering all the questions provided below.
Learning Objectives:





Understand and practice creating network dataset
Understand geometric network and practice creating a stream geometric
network
Understand and practice geocoding
Perform network path analysis using the Utility Network Analyst
Export and view geodatabase schema using ArcGIS Diagrammer
Introduction
Geometric network is used to model real world connectivity that are both man-made
(e.g. roads, water, sewer and electrical) and natural (e.g. streams). Geometric network
consists of edge network features and junction network features. An edge feature
represents a path along the network. Examples of edge features include roads,
pipelines, or streams. Edges must come from a line feature class. A junction feature
represents a point in a network where edges connect each other. Examples of junction
features include road intersections in road network, T-valves or straight-line connectors
in pipeline network. Edges must be connected to other edges through junctions.
Using ArcGIS Desktop suite you can create and model relationship between points and
lines (edges and junctions). You can define rules on how features within the geometric
network interact to model connectivity, including edge to edge and/or an edge to
junction rule. Similar to geodatabase topologies, geometric networks are stored in a
1
geodatabase feature dataset to maintain consistent coordinate system information.
Geometric networks can be managed using ArcCatalog. Different from most items that
appear in ArcCatalog, the geometric network does not represent a single entity, such as
a table, a shapefile, or a feature class. A geometric network is actually an association
among several feature classes and is represented by several tables in the database. In
this assignment, you will learn how to create road network and stream geometric
network.
Preparations
Downloading Data
Download and unzip Assignment 3 data from the course data folder to your data
folder.
*** The labAssignment3 folder contains the following files:



labAssignment3\data\PotenPolluIncident.xls
labAssignment3\data\HydroEdge.shp
labAssignment3\data\HydroJunction.shp
Importing Data to the Geodatabase:
Import the attribute data and shapefiles to WRIA9.gdb (from Assignment 2). Name the
output table and feature classes as listed below:



PotenPolluIncident.xls  PotentialPollutionIncidents
HydroEdge.shp  import to HydroNetwork feaure dataset  name it
HydroEdge
HydroJunction.shp  import to HydroNetwork feature dataset  name it
HydroJunction
Part I: Transportation Network
Part I: Transportation Network
A transportation network normally consists of a great deal of undirected segments. This
means that although an edge in a network may have a direction assigned to it, the agent
(the person or resource being transported) is free to decide the direction, speed, and
2
destination of traversal. For example, a person in a car traveling along a street can
choose which street to turn onto, which direction to drive, and when to stop.
In this part of the assignment, you will create a road network in your geodatabase. First,
you will learn how to geocode and create a point feature class for potential pollution
incidents along a road. You will then learn how to create a road network and apply and
validate behavior for the network.
Creating a Road Network Dataset
Before creating a road network dataset, you need to add two new fields in order to set
up speed limit and time travel values for each road section.
1. Open ArcCatalog. Right click WRIA9_Roads (in RoadNetwork feature dataset)
 Properties  click Fields tab  scroll down to the end of the Field Name
column in the table  Add two new fields as specified below:
 Field Name: SpeedLimit; Data Type: Short Integer
 Field Name: TravelTime; Data Type: Double
Click OK.
Now, you will calculate the speed limit for road segments in WRIA9_Roads feature
class.
2. Open ArcMap and save the new map document. Add WRIA9_Roads to you
map.
3. Open the attribute table of WRIA9_Roads and examine the two new fields
you just added. What are their values now? Can you calculate the values
using Field Calculator now?
4. Click the Editor Toolbar dropdown menu  Start Editing. Then right click
the heading of the SpeedLimit field  Field Calculator  enter 0 in the
expression box.
5. Repeat the calculation process to assign a value of 0 to the TravelTime field.
6. Now you will populate these two new fields. Click Select by Attribute from
the Table Options dropdown menu. First, you will select roads that are
classified as Highways. Recall in Assignment 1, you created a field called
“Categories” to classify roads/streets in WRIA9 into three groups: Highways
(Category 1), Arterial/Collector Roads (Category 2), and Residential Side
Streets (Category 3). Therefore, in the expression box in the Select by
Attributes window, select Highways using the following SQL Expression:
“Categories” = 1.
7. In the Attribute Table, choose to show only the selected features.
3
8. Right click the heading of SpeedLimit field  select Field Calculator  type
60 in the expression box in the Field Calculator window. Here the value of 60
represents a speed limit of 60 miles per hour.
9. Repeat step 6 to 8 to calculate the speed limit for the other two road
categories using the following details:
 Where “Categories” = 2, SpeedLimit = 35
 Where “Categories” = 3, SpeedLimit = 25
Now that the SpeedLimit field is populated, you can then calculate travel time for each
road segment using SpeedLimit and Shape_Length. The unit of travel time will be minute.
10. Make sure to clear your selection and show all records before calculating the
travel time. Right click the heading of TravelTime field  click Field
Calculator  enter the following equation in the expression box:
([Shape_Length] * 60) / ([SpeedLimit] * 5280). Note: Shape_Length is
measured in foot. Why foot here?
11. Stop Editing and Save Edits.
Now, you are ready to create a geodatabase road network dataset.
12. Close ArcMap and Open ArcCatalog if it is not open.
13. Enable/load Network Analysis Extension by clicking Customize and then
selecting Extensions. Check the box next to Network Analyst if it is not
checked. Close the Extensions window.
14. In WRIA9.gdb, right click the RoadNetwork feature dataset  New  click
Network Dataset to create a new network dataset. This will open the New
Network Dataset Wizard. Name the network dataset WRIA9RoadNetwork,
and choose version 10.1. Click Next.
15. Select WRIA9_Roads as the feature class that will participate in the network
dataset. Click Next.
4
16. Click Yes for modeling turns. Click Next.
17. Ignore connectivity in this case. Click next.
18. Since there is no elevation data in our data, choose None for modeling the
elevation. Click next.
19. Now, you will specify the attributes for the network dataset, which are
Shape_Length and TravelTime. Before adding our attributes, Remove Length
and Minutes that were automatically listed in the wizard window.
a. Click Add to add the attribute variable Shape_Length, as a Cost, with
Feet as Units and Double as the Data Type
b. Click the Add button again and add TravelTime as a Cost, with
Minutes as Units and Double as the Data type
c. Finally, add Categories as a Hierarchy. Then click Next.
20. Choose Yes for establishing driving directions. Click Next.
21. Review the Summary of the Network Dataset and click Finish. Click Yes to
allow ArcCatalog to build the network dataset.
Now, you have a geodatabase network dataset that allows ArcGIS to understand roads
in WRIA9 and the connected entities. With this connectivity, the program can model
routing, among other things. SpeedLimit and TravelTime as well as Categories hierarchy
provide the networking program/software with criteria for making choices, such as
which roads to turn down when constructing a Least Coat Path through the road
network.
Question 1: Explain in your own words the purposes of SpeedLimit and TravelTime
fields for the future analysis?
5
Geocoding: creating a point feature class of potential pollution incidents on a street
Geocoding is a process of creating point feature class based on a table with street
addresses. Geocoding not only requires an input table of street addresses, but also
requires reference data (road network dataset) with specific attribute information. An
address locator is used to define the fields in the reference data that are used to
determine the exact location of a specific address on a street and which side of the street
it is on. For example when you are given an address of 158 S Spokane St., you know
that an even number normally means it is located not only within a certain block but
also on a specific side of the street. Once the address locator has been defined, the
addresses can be matched to the reference data and a new point feature class can be
created. The output point feature class will contain fields that are specific to geocoded
data, such as status, score, match_type, side, match_addr, street or intersection and
address. Status is an import field as it indicates whether the addresses have been
matched (location was found), tied (two or more potential locations were found), or
unmatched (no location was found).
In this section of the assignment, you will create a point feature class of potential
pollution incidents along the streets. You will need to set up an address locator first.
Address Locator is used to define which fields in the reference data are used for
geocoding. While there are a number of address locator styles available to work with,
the choice of style depends upon the fields in the reference data. For example, some
address locators use the postal code for geocoding. In this assignment you will use “US
Address – Dual Ranges” locator to create a point feature class.
Open ArcMap and add WRIA9_Roads to your map. Open its attribute table. The
address data for each road segment in the table is divided into several different fields,
including DIRPREFIX, ST_NAME, ST_TYPE, and DIRSUFFIX, etc. Since every layer
that contains address data could be coded differently, and every list of addresses is a
little different, the Address Locator file is necessary to allow them to talk to each other.
First, you will create an Address Locator file for this assignment:
22. Open ArcToolbox in ArcMap, click Geocoding Tools  Create Address
Locator
23. In the Create Address Locator window, select and enter the following:

Address Locator Style: US Address – Dual Ranges (if you see an error
warning sign down below next to Field Map, ignore it for now.)
6


Reference Data: WRIA9_Roads feature class. Role: Primary Table. The
error warning sign will disappear.
Field Map was populated once you selected the address locator style. You
can see that some Field Names are marked with stars, meaning ArcGIS
has determined that a necessary component is missing. You will need to
update Alias Name column to let ArcGIS know you are using a different
name. Click the blank area next to every field name that comes with a star
and pick an option according to the list below:











*From left FRADDL
*To left  TOADDL
*From right  FRADDR
*To rightTOADDR
Prefix Direction NONE (Note: there is no star)
Prefix type  NONE
*Street Name  ST_NAME
Suffix Type  ST_TYPE
Suffix Direction  NONE
Left Zip Zone  ZIP_L
Right Zip Zone  ZIP_R

Output Address Locator: navigate to your Assignment 3 folder and name
the output file as PollutionAddressLocator. ***Note: Do not save it in your
geodatabase.***

Click OK. You now have an Address Locator that can be used to geocode
addresses.
7
Question 2: Why do we need to create an Address Locator before geocoding addresses?
Geocoding addresses do not actually find a specific building with a given address. It
operates by estimating approximate position. It does this by comparing the address in the
list to the beginning and ending addresses listed for each road segment in the
WRIA9_Roads feature class. If the target address is between the beginning and ending
addresses for that road segment, it calculates how far along the street the target address
could be located. It also knows on which side of the street the target address should be,
based on whether the address number is even or odd. Follow the steps below to learn
how to perform the task:
24. Add the table PotentialPollutionIncidents from WRIA9.gdb to your map.
25. Go to Customize Toolbars Geocoding to enable the geocoding toolbar.
26. On the geocoding toolbar, click
(Geocode Addresses)
27. When the Geocode Addresses wizard opens, select the
PollutionAddressLocator as the address locator to use. In the dialog window,
select the following setttings:






Address table: PotentialPollutionIncidents table
Street or Intersection: Address
ZIP: ZIP
Output shapefile or feature class: navigate to RoadNetwork feature dataset
and name the output feature class PotentialPollution_Result. You need to
change the “save as type” to “Personal and File Geodatabase feature
class” in order for your geodatabase to show in the folder directories.
Click the Geocoding Options… botton
o Set Side offset to 15 feet (An offset is the distance from the road
centerline that the geocoded point will be placed. An address does
not refer to the center of the street, after all. A reasonable value for
the offset would be 15 feet). Click OK to close the window.
Click OK and the geocoding will process. The report generated provides
the geocoding results, i.e. the number and the percentage of matched,
unmatched, and tied records. Note that if there are 2 unmatched records,
which is typical in geocoding, you will need to fix them based on the
following steps. But if no unmatched records are found, you can go
directly to Question 3.
o Click Rematch button. The resulting screen lets us view the address
data for the unmatched address and manually fix it or make other
choices that the geocoding process cannot make.
8
o In the top part of the window, select the unmatched record with
address 3800 West Margi Way SW Seattle 98106 (step 1 in the figure
below)
o Determine the correct address by searching it in Google Map. Type
“3800 West Margi Way SW Seattle 98106” in Google Map. You will
see the notice saying “Showing results for 3800 West Marginal Way
SW Seattle 98106” So you know that the address in our table
misspelled Marginal for Margi. Therefore, you need to enter the
correct address in the Address Box (step 2 in the figure below).
o Click the Search button (step 3 in the figure below).
o Review the candidate location for the address. In this case, you will
see that the first candidate is the correct one. Click on it (step 4 in
the figure below).
o Once you have determined that a candidate is a match, click the
Match button (step 5 in the figure below).
o Once you click Match, you will see that at the top right corner of
the window the green color sign of Matched has changed to 75%.
o Select the other unmatched record and match it to the best
candidate. Then your addresses should be 100% Matched.
1
4
2
3
5
Question 3: Provide a screen shot of geocoding results attribute table (Geocoding
Result: PotentialPollution_Result) with the matched records.
Question 4: How might you be able to use geocoding and network analysis to obtain
information from your road dataset? Give two examples of potential practical uses of
these techniques.
9
Part II: Stream Geometric Network
A geometric network has a corresponding logical network. The geometric network is
the actual set of feature classes that make up the network. The logical network is the
physical representation of the network connectivity. Each element in the logical
network is associated with a feature in the geometric network. Once a geometric
network is in place, ArcMap and ArcCatalog have tools that treat the network features
in a special way. Editing and tracing on the network, as well as managing the feature
classes participating in the network, are all handled automatically by ArcGIS. In this
part of the assignment, you will use ArcCatalog to create a stream geometric network.
Question 5: Explain what a logical network is in your own words? What is the
relationship between a logical network and a geometric network? Use ArcGIS Help
document to help you understand the concepts and answer the question.
In this part of the assignment, you will perform the following tasks: 1) using ArcCatalog
to create a stream geometric network; 2) applying and validating behavior for the
geometric network; and 3) running network path analysis using the Utility Network
Analyst toolbar.
Creating a Stream Network Dataset
1. In ArcCatalog, right click HydroNetwork feature dataset  New 
Geometric Network.
2. Read the information in the New Geometric Network wizard window, then
click Next to initiate the Geometric Network creation process.
3. In the next window, keep the default name HydroNetwork_Net, and keep
NO for “snap features with specified tolerance”. Click Next to continue.
4. Select HydroEdge and HydroJunction feature classes to build the stream
geometric network. Then click Next to continue.
5. Click Yes to preserve existing enabled values. Click Next.
6. Keep the default roles for the network feature classes. Change the Sources
and Sinks for HydroJunction to Yes. Click Next.
7. No need to add weights to your network. Click Next to continue.
8. Review the Summary of your input and then click Finish.
9. Now in ArcCatalog, you have a HydroNetwork_Net geometric network, and
a HydroNetwork_Net_Junctions feature class in the HydroNetwork feature
dataset.
10. Close ArcCatalog.
10
Analysis on an ArcGIS geometric network can easily be done through the Utility
Network Analyst toolbar in ArcMap. This toolbar allows a user to perform different
operations on an ArcGIS geometric network such as creating flow direction, trace
upstream/downstream, and running network path analysis, etc.
11. Open ArcMap, add the HydroNetwork _Net geometric network. Click Zoom
to Layer to see the data.
12. Uncheck HydroNetwork _Net_Junction.
13. Activate Utility Network Analyst by clicking Customize  Toolbars 
Utility Network Analyst.
14. On the Editor Toolbar, click Start Editing.
15. Open attribute table of HydroJunction feature class. There should be a field
called AncillaryRole. Select points that are supposed to be sinks (i.e., find the
points at OBJECTID = 16 and 21, and check the map to make sure that these
points are the last points connected to the Sound). Click on the value box of
AncillaryRole field and set it to Sink.
16. On the Utility Network Analyst Toolbar, click on the Flow dropdown menu
and select Display Arrows.
17. Click the Set Flow Direction button
. You will see that the circle symbols
are changed to arrow symbols to determine flow direction.
18. Now, click the Flow dropdown menu again and select Display Arrows to
turn off the symbols of flow direction.
19. Click the Choose Trace Task dropdown menu and select Trace Downstream.
20. Use Add Edge Flag Tool
to add two points in the HydroEdge feature
class as in the figure below. Please make sure that two points must be
connectable via features.
21. Click the Solve button
. You should get something similar to the image
below.
11
Question 6: Provide a screen shot of the Trace Downstream path that you just created.
1. Click on the Analysis dropdown menu and select Options.
2. Click the Results tab  choose Selection in Results format. Then click OK.
3. Click the Solve button again, and check the attribute table of HydroEdge
feature class.
Question 7: Provide a screen shot of the selected records in the attribute table of
HydroEdge. How many records from the table are selected from solving the Trace
Downstream?
Part III: Geodatabase Schema
Same as what you did in Assignments 1 and 2, use ArcGIS Diagrammer to export and
view your geodatabase schema.
Question 8: Provide a screenshot of the schema diagram of WRIA9 geodatabase and
provide a brief description of your understanding of this geodatabase.
12
Download