Creating an Attributed Intermodal Network Database in TransCAD

Bruce Spear, BTS


  1. Copy contents of subdirectory /Ck/GIS/Tc-mpt/ from the CD-ROM to a local hard drive.

  2. Run application file Ckg02mpt.exe
    1. Application will extract 6 files:
      1. Ckg02lc.geo is a comma delimited file of shape points for each link
      2. Ckg02ll.dcc is a text file of the record layout for the link attributes
      3. Ckg02ll.txt is a comma delimited file of attribute records for each link

      4. Ckg02nc.geo is a comma delimited file of coordinates for each node
      5. Ckg02nd.dcc is a text file of the record layout for the node attributes
      6. Ckg02nd.txt is a coma delimited file of attribute records for each node

  1. Import file Ckg02lc.geo into TransCAD:
    1. Click "File Open" from tool button
    2. Select File Type "Text/Geography (*.geo)" from list
    3. Select File Name Ckg02lc.geo from your directory
    4. Select Layer Type "Line"
    5. When asked, provide a File Name for resulting file (e.g., CFS Intermodal)

The resulting TransCAD line layer shows 3 attributes: ID, Length,& Direction. The Link ID field matches the Lseg field in the Ckg02ll.txt file. To add intermodal link attributes to this TransCAD line layer, simply join the line layer to the Ckg02ll.txt file by matching Link ID to Lseg.

The associated endpoint layer also shows three attributes: ID, Longitude & Latitude. However, the ID field of the endpoint database was generated by TransCAD when it built the line database, and DOES NOT MATCH the "Jseg" field in the node database. In order to add attributes to the node layer, you need to create a "crosswalk" between the ID field in the endpoint layer and the Jseg field in Ckg02nd.txt. Here's how to do it:

  1. Add node fields to the TransCAD line layer:
    1. Make the line layer the current layer in TransCAD
    2. Click "Open Dataview" from tool button
    3. Click "Formula Field" from tool button in Dataview window
    4. Click "Node Fields..." from button in formula window
    5. Select ID from fields and "To and From" from options

The resulting database will have two new fields containing the From ID and To ID nodes associated with each link in the TransCAD line layer.

  1. Join line layer with Ckg02ll.txt file:
    1. Click "Join Dataviews" from tool button
    2. Select "File Open..." from "To Table" list
    3. Select "Comma Delimited Text" as file type and "Ckg02ll.txt" as file name, and open this file.
    4. Verify that the "From Field" is "ID" and the "To Field" is "Lseg"
    5. Select "Options" tab
      1. Select "One to one join" and "Show the joined view in a dataview"
    6. Click "OK"

TransCAD will join the line layer file with the Link attribute file based on the common ID field.

The joined file includes four attributes that identify the nodes or endpoints of the line segments: From ID, To ID, Anode, & Bnode. From ID is the TransCAD-assigned sequence number for the node identified by the Anode identifier in the Ckg02ll.txt file. Similarly, To ID is the TransCAD-assigned sequence number for the node identified by the Bnode identifier in the Ckg02ll.txt file. These four fields provide the crosswalk needed to assign the appropriate node attributes to the TransCAD endpoint layer.

But first they must be joined to the endpoint file.

  1. Join endpoint file to joined line layer:
    1. DO NOT CLOSE DATAVIEW OF JOINED LINE LAYER AND ATTRIBUTES
    2. Click on map window and change current layer to "Endpoints"
    3. Click "Open Dataview" from tool button
    4. Click "Join Dataviews" from tool button
    5. Under the "Settings Tab":
      1. Verify that you are joining From Table "Endpoints" and From Field "ID" to To Table "Ckg02lc+Ckg02ll" and To Field "From ID". If the To Table options do not show this joined line database, click on the "Options Tab" and select "Allow all types of joins". Then return to the "Settings Tab" to make the appropriate changes.
    6. After the From and To Tables and Fields are set, click "Options Tab."
      1. Select "One to many join" and "Show the Joined view in a dataview"
      2. Click "Aggregation" button. A list of all fields in the "Ckg02lc+Ckg02ll" will appear, allowing the user to choose how they will be handled in the joined database.
      3. For the "Anode" field, select only the "copy" option. For all other fields remove all options, so that the chosen options window displays "None"
    7. Click "OK" button. A message box will appear that says "The joined view you are about to create is a many-to-one join. Continue? Click yes.

The resulting joined view contains five attribute fields: ID, longitude, & latitude (from the original endpoints file), Anode (the corresponding sequential identifier, Jseq, used in the Ckg02nd.txt file), and a number indicating how many times that node appeared as the "From node" or "Anode" among all line segments in the database. Because some nodes may only appear as a "To Node" or "Bnode", the Steps 6d thru 6g need to be repeated, but with the following changes (highlighted in bold):

    1. Click "Join Dataviews" from tool button
    2. Under the "Settings Tab":
      1. Verify that you are joining From Table "Endpoints+Ckg02lc+Ckg02ll" and From Field "ID" to To Table "Ckg02lc+Ckg02ll" and To Field "To ID".
    3. After the From and To Tables and Fields are set, click "Options Tab."
      1. Select "One to many join" and "Show the Joined view in a dataview"
      2. Click "Aggregation" button. A list of all fields in the "Ckg02lc+Ckg02ll" will appear, allowing the user to choose how they will be handled in the joined database.
      3. For the "Bnode" field, select only the "copy" option. For all other fields remove all options, so that the chosen options window displays "None"
    4. Click "OK" button. A message box will appear that says "The joined view you are about to create is a many-to-one join. Continue? Click yes.

The resulting joined viewed should contain two additional fields: a Bnode field, which should be identical to the Anode value except where no Anode exists, and a number indicating how many times that node appeared as the "To node" or "Bnode" among all line segments in the database.

The Anode and Bnode fields can be combined into a single unique identifier field using the TransCAD formula function.

  1. Combine Anode and Bnode fields
    1. Click "Formula Field" from tool button
      1. Type "Jseq" for name field
      2. Type "If Anode <> null then Anode else Bnode" in formula space
      3. Click OK

The resulting field is the equivalent "Jseq" identifier for each Endpoint in the TransCAD database. This "Jseq" can then be used to join the Endpoint layer to the node attribute file Ckg02nd.txt.