Skip to content

check_hwy_fcs()

ccai-cmap edited this page Oct 2, 2025 · 30 revisions

Here, the base links and nodes will be checked, along with the project feature class. Errors will be written to a text file in the output folder called "base_feature_class_errors." If there are any errors at all, they will crash the program, so you HAVE to fix them.

A diagram showing what check_hwy_fcs() checks.

Primary Key Check

  • NODE IDs must be unique: checks hwynet\hwynet_node. Nodes cannot share IDs.
  • ANODE-BNODE combos must be unique: checks hwynet\hwynet_arc. One link cannot have ABB ANODE-BNODE-0 and another link ABB ANODE-BNODE-1. A link must have a unique ANODE-BNODE combo, and it must be in only 1 state (regular or existing).
  • TIPIDs must be unique: checks hwynet\hwyproj. A TIPID must uniquely define a project.

At the end of this stage, if there are violations, the program will be crashed.

Individual Row Check

Node Check

  • Nodes must not be disconnected: if a node does not appear as the ANODE or BNODE of any link, then it is disconnected.

Link Check

  • Links should not be multipart: if a link is multipart, it should be redrawn.
  • ANODE and BNODE must be present in the node feature class: a link must have valid end nodes.
  • The first point must be spatially equal to ANODE and the last point must be spatially equal to BNODE: otherwise, the link should be redrawn.
  • ABB must be equal to ANODE-BNODE-BASELINK.
  • Links which share two common nodes must have DIRECTIONS == 1: if link i is ANODE-BNODE and link j is BNODE-ANODE, then both i and j must have DIRECTIONS == 1.
  • Rows must not violate domains: all attributes must conform to the domains described in Highway Data.
  • DIRECTIONS should not be 0: all links should have DIRECTIONS filled in.
  • Skeleton links should not have coded information: attributes which are modified by the project coding table should have their values set to the default.
  • Regular links should have all required fields filled in: TYPE1, AMPM1, THRULANES1, THRULANEWIDTH1, and MODES should all be filled in. TYPE1 will determine whether POSTEDSPEED1 is required.
  • Regular links with DIRECTIONS = 1 or 2 should not have unusable 2 attributes filled in: TYPE2, AMPM2, POSTEDSPEED2, THRULANES2, THRULANEWIDTH2, PARKLANES2, and BUSLANES2 should all be 0.
  • Regular links with DIRECTIONS = 1 should not have PARKRES2 filled in.
  • Regular links with DIRECTIONS = 3 should have all required 2 fields filled in: TYPE2, AMPM2, THRULANES2, and THRULANEWIDTH2 should all be filled in. TYPE2 will determine whether POSTEDSPEED2 is required.
  • PARKRES1 and PARKRES2 should not be 0: 0 is reserved for the coding table and means no change.
  • VCLEARANCE should not be negative: -1 is reserved as a value for the coding table which means "set to 0."
  • TOLLDOLLARS should be valid: it should either be a decimal or a string of 8 decimals representing the 8 TODs.

Connectivity Check

TODO: check for connectivity

Clone this wiki locally