Skip to content

MHN Module

Noel Peterson edited this page Jul 17, 2013 · 8 revisions

This module, imported by virtually all of the other MHN processing scripts, provides a centralized location to store variables and useful functions pertaining to the processing of the Master Highway Network. This allows for the individual processing scripts to be shorter and simpler, and the perils of code duplication are all but eliminated. Additionally, changes to MHN-specific properties that are used in multiple scripts (such as the scenario years for Conformity analyses and their corresponding numeric codes) can be made in a single location and be consistently applied by all scripts.

Some such variables are:

  • centroid_ranges: a dictionary of the zone centroids corresponding to various geographies (i.e. centroid_ranges['Chicago'] would return the range 1-309).
  • projection: the definition of the specific Illinois State Plane (NAD27) projection that all MHN/MRN data is stored in.
  • scenario_years: a dictionary of the numeric scenario codes used for Conformity networks, and the years they correspond to.
  • tod_periods: a dictionary of the time-of-day period codes and their corresponding hours (as well as a SQL-formatted query for selecting all of the bus runs that fall within each).

The module also specifies a number of paths for feature classes, itinerary tables, and input/output directories based on the location of the version of the MHN geodatabase currently being processed.

Clone this wiki locally