Ask A Cartographer

connect shapefile to a dataset

November 02 2010 | 0 comments
Categories: ArcGIS Methods

hi,

I have a geodatabase that im working on. It is a city map and it has a network dataset and 2 feature classes, one for the roads and one for the junctions. Is there a way that I can let the junctions tell what segments of the roads feature class (not the network dataset) are connected to it? I tried the network identify tool but it tells what parts of the ND are connected to that junctions (not the roads feature class which i want).

Thanks in advance.

Mapping Center Answer:

The junctions generated by the network dataset are "system junctions" and should not be modified or used for storing any attributes. Also since they are system maintained, you have no control over when they will be recreated or deleted as the network dataset is re-built.

What you are trying to achieve can be done in number of ways… The idea of storing connected street names as attribute values for junctions is not a good one. Every junction can have variable number of streets connected to it. So You don't know how many attributes you will need on junction. At best you will have to create duplicate junctions (one for each connected edge) and store the street name as attribute.

The Network Identify tool (which you mentioned) shows the element ID and not the objectID (OID) of the edges that are connected to a junction. The reason being that each edge can be made up of one or more elements. From the user interface there is no out of the box way to get the corresponding OID for a given element ID. However, programmatically it is possible.

One way to get close to what you want is to use the Spatial Join tool. You can join the streets to the junctions and transfer the street names from the streets to the junction. In this screen shot we have tried to do that.

Spatial Join

Note that you need to make sure that the Merge Rule for Name field is Join, otherwise you will end up with only one of the connected streets as the default rule is First. In the output junctions feature class (shown in the table window in the screen shot), each junction has one or more rows depending on the number of streets connected. The selected junction has three records as it is connected to three streets.

This method will not honor underpasses and overpasses as it will treat all of them as connected. So the most accurate way would be to do this programmatically using ArcObjects (this step can't be done using Python).

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |