In this example, we show you how to create a new Cube network (feature dataset) from a shapefile. You can start the Build Network from Shape tool in two ways:
1. You can go to File > Tools > Build Network from Shape… (Figure 1)
2. Or you can use the Data Manager button to build the network and select Build Network from Shape (Figure 2)
Subsequently, a dialog box appears (Figure 3).
In this example, you need to use a shapefile (Highway_Network.shp) as input and create a new .NET file as output. In addition, you need to select the A, B node fields, use a one-way indicator field, and set the number of zones to 25 (Figure 4). Finally, you need to click OK. In order to understand all the options available in the dialog box, which are not necessarily used in this example, please read the description section below.
The figure below shows the new network (Figure 5)
Please use the following link to download the shapefile and build your own network from shapefile: InputData.rar (83.4 KB)
1) The main Input file, Links (Polyline), is a shapefile or feature class that contains the link data and geometry that the users wants to import. The Nodes (Point) option, however, is optional. If selected, the specified shapefile or feature class must contain point features. If a point file is selected, the Node number option must be used. The Node number is the field in the point file containing node numbers.
Note: The build network tool only uses the node data for determining the node numbers. It does not import node attributes into the output network.
For more information, please read the Cube Help (Cube Base > Managing Data > Managing Geodatabases in Cube > Build Network from Shape File).
2) The Output file is a geodatabase or directory that will contain the new network (feature dataset). The network name should only use alphanumeric characters and underscores.
3) In the A and B Node Fields, use the specified fields as A and B nodes. The A-Node option is the field in the link file that contains the A-node. Likewise, the B-Node option is the field in the link file that contains the B-node. If you specify a field other than A (or B), Data Manager renames that field A (or B) in the output file. If a field named A (or B) already exists, Data Manager renames that field A0 in the output file. (In this case, if A0 exists, Data Manager renames that field A1, and so on). If the specified field contains a nonzero number, Data Manager assigns that number to the node. If the field contains a zero, Data Manager queries the line file or the point file spatially for a node at the same location. If no matching node is found, Data Manager automatically assigns a sequential number to the node.
The Level option, which is the input field that contains the shape level, is optional. If specified, Data Manager only connects shapes that have the same level unless specific connection criteria are met. Data Manager can accommodate levels between 0 and 254. Use this field if the shapefile defines multiple shapes (not all connected to a single node) at all intersections between shapes—for example, if the shape file breaks two intersecting lines into four lines. For more information, please read the Cube Help (Cube Base > Managing Data > Managing Geodatabases in Cube > Build Network from Shape File).
The Join using ID, FROM_ID and TO_ID fields option is used to join the point shapes and line shapes together using the ID, FROM_ID, and TO_ID fields. This option is useful when the ID fields do not contain node numbers, such as shape files exported from HERE, TomTom, etc. For more information, please read the Cube Help (Cube Base > Managing Data > Managing Geodatabases in Cube > Build Network from Shape File).
The Add new A and B fields option is only visible if the input line shape file does not contain fields for A and B nodes. If an A or B exists, they will be selected in the A/B Node dropdowns accordingly. Checking this option will add an A and B field to the created network.
4) The One and Two-Way Options determines how the input links will be treated. If All one-way is selected, all input links will be treated as one-way links. Similarly, if All-two-way is selected, all input links will be treated as two-way links. As shown in the example, the Indicator field option, will allow the user to select a field from the adjacent drop down that contains the values that indicate the direction of the output links. If the value is 1, then the output link is one-way in the indicated direction (A to B). If the value is -1, then the output link is one-way in the opposite direction (B to A). Finally, if the value is 2, the output will be two-way. The Change 0 values to 2 (for 2-way) option is used to ensure that all two-way links in the created network have the value of 2 in the field indicating direction. For more information about the other options, please read the Cube Help.
5) The Distance Options will allow the user to specify whether to add distance field to the output network. If the Add distance field option is selected, a field, named DISTANCE, will be added to the output network. The DISTANCE field will store the shape’s true distance (the sum, of all segments). If the Add distance field option is selected, the Scale option must be specified. If a field named DISTANCE already exists, Data Manager renames that field DISTANCE0 in the output file. (In this case, if DISTANCE0 exists, Data Manager renames that field DISTANCE1, and so on.).
6) The Node Options will allow the user to specify the grouping limits, the starting new node number, and the maximum zone number. The Grouping limit option is the maximum distance between endpoints of link shapes for Data Manager to consider them a single node. The Start node number option is the starting number that Data Manager uses when adding new nodes. It must be greater than the highest node number in the input file. Finally, the Max zone number option is highest zone number in the output network. This value does not affect the network-building process.
For more information about the properties that define the new network, please read the Cube Help (Cube Base > Managing Data > Managing Geodatabases in Cube > Build Network from Shape File).