Basin Customization - Adding Links Lab 5
Step 8 - Join streamlink attributes to basin attribute table.
Objective: Add upstream/downstream links to basins.
The upstream/downstream relationships are added to the basins
by using the attributes from the final edited streamlink theme. This
is done by joining the streamlink attributes to the basins attributes
using the [Pfaf_id] field in the streamlink table and the [Pfaf_orig] field
in the basin table.
Procedure:
- Start ArcView and open project basins/cust/cust4.apr.
- Open View1.
- Make the slfinal.shp streamlink theme active by clicking on its
legend.
- Click on the "Open Theme Table"
button.

- From the Table menu, select "Properties". Turn off the Visible check
mark for all fields except:
- Shape
- Basin_id
- Parent_id
- "Upstream" fields.
- Pfaf_id
- Length_mi
- In the streamlink table, select the [Pfaf_id] field.
- Return to the View and make the basin them active by clicking on
the legend.
- Click on the "Open Theme Table" button.
- Select the [Pfaf_orig] field.
- Make sure both the streamlink and basin attribute tables are open
and make the basin table the active table. Click on the "Join"
button.
The streamlink table will automatically close.
- Return to the View and ensure the the basin theme is the active
theme.
- Click the "Clear Selection" button.
- From the Theme menu, select "Convert to Shapefile..." and save to
kxxx_ref_basins.shp. Answer
yes to add the new theme to the view.
- Return to the original basin table with the streamlinks joined to
it.
- In the View, keep the original basin theme the active theme.
- Click on the Open Theme Table button.
- From the Table menu, select "Remove all Joins".
- Return to the View and make the kxxx_ref_basins.shp theme the active
theme by clicking on its legend.
- The upstream links are sorted by flow accumulation. However, the
flow accumulation values in the streamlink shapefiles may not represent
the basin area and may not reflect upstream HUCs. Therefore, the flow accumulation
must be recomputed based on the actual basin areas. Before running the flow
accumulation tool, the existing flow accumulation must be initialized to
zero. (Any basins that receive flow into them from outside the theme should
be reset to a reasonable or flag value instead of zero to indicate that
it is the mainstem segment. However, this sample data set has the complete
stream network).
- Click on the "Open Theme Table"
button.
- From the Table menu, select "Start Editing".
- Select the [Flow_acc] field.
- Click the Calculate button and enter 0 for the value. Click the
Ok button.
- From the Table menu, select "Stop Editing" and save the edits.
- Return to the View and make the kxxx_ref_basins.shp theme active.
- From the Bsn-Tools menu, select "Area/Length". Use the default projection.
- From the Bsn-Tools menu, select "Compute Flow Accum". This will take
a few minutes as each basin's area must be added to all downstream basins'
flow accumulation.
- From the Bsn-Tools menu, select "Add Upstream Links". This is needed
to make sure the upstream links are sorted by flow accumulation.
Step 9 - Join the Basin table to the streamlink theme
Objective: Ensure streamlink and basin attribute tables are consistent.
The basin theme now has the proper topology established by flow
accumulation. To make the basin and streamlink themes consistent, the
basin attributes need to be added back to the streamlink theme. This
will be done through a table join using the [Basin_id] field.
Procedure:
- In the View, make the kxxx_ref_basins.shp theme the active theme.
- Click on the "Open Theme Table"
button.

- Make the [Basin_id] field active.
- Return to the View and make the slfinal.shp streamlink theme the
active theme.
- Click on the "Open Theme Table"
button.

- From the Table menu, select "Properties...".
- Turn off the Visible check mark for fields that are duplicated
in the basin theme including the [Pfaf_id], [Parent_id], [Flow_acc], and
"Upstream" fields. The fields that must remain on are:
- Make the [Basin_id] field active.
- Make sure both the streamlink and basin attribute tables are open
and make the streamlink table the active table. Click on the "Join"
button.
The basin table will automatically close.
- Return to the View and ensure the streamlink theme is the active
theme.
- Click the "Clear Selection" button.
- From the Theme menu, select "Convert to Shapefile...". Save the
new shapefile as kxxx_ref_sl.shp
.
- Make the slfinal.shp theme the active theme.
- Click on the "Open Theme Table"
button.
- From the Table menu, select "Remove All Joins".
- You may also want to make all the fields in this table visible
again from the Table Properties menu.
Done!