Skip to content

bkr_slope.py

HU DONG edited this page Mar 11, 2020 · 3 revisions

The tool calculates cumulative elevation gains along a link in every 30 feet. Slope is then calculated from the cumulative elevation gain. It would reflect a bicylist's real climbing experience.

For some unknown reason, this tool would crash when executing ExtractValuesToPoints. Before it is fixed, we split the code and make it two scripts. So after the crash, run bkr_slope_step2.py to finish calculation.

More detailed description about the slope calculation can be found here and here.

Prepare Inputs

ArcMap and spatial analysis license are required for this tool. User needs to create a file geodatabase to keep transportation network. The transportation network is link feature class exported from EMME databank. In addition, USGS topology raster data is also needed.

Make sure the link feature class has an attribute F_biketype.

Input variables

Variables Description Sample Value
geodb file geodatabase path V:\TransDeptGIS\GeoDB\Planning\Modeling\BKRCast_BikeNetwork.gdb
in_fc elevation raster file path V:\ExternalData\UWGeology\GeoMapNWFeb2010\usgs_dem_30ft
output_dir output directory for final results

Outputs

File Name Description
emme_attr.in an EMME transaction file that is used as an input file to the bike model
emme_attr.csv same file as emme_attr.in but is friendly with ArcMap.
link_component points split from links
link_component_full points with all associated link attributes
link_component_elevation point with elevation
ij_df.csv directional links
ji_df.csv directional links

directional links

Attribute Description
ID link ID
LENGTH link length
MODES link modes
INODE link i-node
JNODE link j-node
F_biketype bike facility type