Copying source feature classes

Each feature class in a geodatabase has a feature class ID, which is an automatically generated integer that uniquely identifies the feature class within a geodatabase. When you copy a feature class from one geodatabase to another, the feature class IDs of the original and the copy will likely be different. If you copy and paste within the same geodatabase, their IDs undoubtably will be different.

In a network dataset, the participating source features and records sometimes refer to one another, in part, through feature class IDs. So if a feature class ID is different than expected, the references to the features are broken.

The network data types that refer to feature class IDs, and therefore may have broken references when data is copied, are turns, signposts, and traffic tables (specifically, the Streets-Profiles and Streets-TMC traffic tables).

When the feature class IDs to which turns, signposts, or traffic tables refer are incorrect, then errors occur or, worse, the IDs are valid but incorrect, which produces unexpected results. For instance, a Streets-Profiles or Streets-TMC join table used with traffic data could reference the wrong street features and thus cause the wrong travel speeds to be displayed or used during analysis. Similarly, the Signpost-Streets join table could reference the wrong streets and result in confusing turn-by-turn directions.

TipTip:

You can avoid problems like these by copying the network dataset to another feature dataset, rather than copying its individual source feature classes. When a network dataset is copied, the source data is copied along with the network and the feature class IDs referenced in the attribute tables for turns, signposts, and traffic are updated automatically to match the new feature class IDs.

If you copy turns, signpost tables, or traffic tables individually, the only way to update the referenced ID fields is through a manual process, which you should try to avoid. An alternative is to create a basic network dataset using the turn, signpost, traffic, and any other network data you plan to use, then copy and paste the temporary network dataset instead of the individual source feature classes. The source feature classes are copied automatically with the network dataset. When the process is complete, you can delete the temporary network dataset or continue using it. This method automatically updates the references to feature class IDs so you don't have to make the updates manually.

If copying the network dataset is not an option for you, or if you need to update feature class IDs for other reasons, you can use the steps below to guide you.

NoteNote:

Assume you have an edge source feature class named Streets, which is called the original Streets feature class in the steps below. Also assume there are original turns, signposts, and traffic data associated to the original Streets feature class. Then this original data is copied to another feature dataset, thereby creating duplicate Streets, turns, signposts, and traffic data. In the steps that follow, the duplicate data is referred to as the copied Streets feature class, turns feature class, signposts-streets table, and traffic tables. Identifying the original data and copied data this way should make it easier to follow these steps.

Steps:
  1. In the Catalog window of ArcMap, browse to the original Streets feature class. Right-click the feature class, then choose Properties.
  2. In the Feature Class Properties dialog box, click the General tab.
  3. Click the button with the ellipsis, which is next to the Name text box.

    The Object Class ID dialog box indicates the feature class ID. Record the displayed value because you may need to find this value in the copied turns, signposts, and traffic table data.

  4. NoteNote:

    The ellipsis button was added to ArcMap at version 10.1 to get the feature class ID. If you need to look up a feature class ID using ArcMap 10.0, use the Python window as described below.

    1. Add the feature class to ArcMap.

    2. Click the Python Window button Python on the Standard toolbar to open the Python window.

    3. On the Python window, type arcpy.Describe("<layer name>").DSID, replacing <layer name> with the name of the feature layer.

      For example, to get the feature class ID of the Streets layer, type arcpy.Describe("Streets").DSID.

    4. Press ENTER.

      The feature class ID is displayed below the command you typed.

    5. Remove the original Streets feature layer from ArcMap.

  5. Get the feature class ID of the copied Streets feature class. Use the same method you used to get the ID of the original Streets feature class.
  6. If the feature class ID values are the same for the original and copied Streets feature class, no further action is required; however, if the IDs are different, you will need to open the attribute tables of the copied turns feature class, Signpost-Streets table, and traffic tables, then replace the ID of the original Streets feature class found in step 3 with the ID of the copied Streets feature class found in step 4.

    • To fix the copied turns feature class, replace the original Streets class ID value found in the fields named Edge#FCID (where # represents a number) with the copied Streets feature class's ID.

      An alternative approach is to create a network dataset on the copied data, then run the Update by Geometry tool. This tool will automatically update the field values of turn features, but you will need to manually edit the geometry of turn features whose vertices don't intersect with the copied street features or those that do intersect with coincident street features. Updating by geometry requires the vertices of turn features to intersect one edge source for the purpose of identifying the source feature class and feature IDs with which the turns are associated.

    • To fix the copied Signposts-Streets, Streets-Profiles, or Streets-TMC join table, locate the EdgeFCID field and replace any occurrence of the original Streets feature class ID with that of the copied Streets feature class.

7/2/2014