Here is a question from a user that I thought is useful enough to post here on the forums for others to see. The question:
"I was attempting to take the geometry of a road segment, and use it as a polyline barrier. However, what seems to happen is that the street intersections contained by the endpoints of the barrier disqualify use of the intersection altogether. In other words, if I have a four-way intersection, and I use the geometry of one of those streets as a polyline barrier, that entire intersection will not be used by the generated route, even though each of the three other streets should be available."
Using a street geometry as a restriction polyline barrier will block the intersections that the street touches. It is because the endpoints of the streets are spatially coincident. As with everything in ArcGIS, there are a bunch of different things you could do to solve your problem. Increasing the cost, instead of restricting the road segment, is a good idea. If you set the BarrierType on your polyline barrier feature to be scaled cost, instead of restriction, then you can easily increase the cost of the edge. If you want it to be practically restricted, then scale it a lot, say 1000 times. That way, the segment would be traversed only if there was no other possible route to your destination. The reason this works and restrictions wouldnâ??t is that you are scaling your restricted street feature from position 0.0 to 1.0, and scaling the spatially coincident unrestricted feature endpoints from 1.0 to 1.0 (or 0.0 to 0.0). If you scale a zero dimensional point like that, it will have no effect on the route. To accomplish this, youâ??ll need to set proper values on two fields for your polyline barrier feature. First, is the BarrierType field. Set this field to â??Scaled costâ??, which is enumerator esriNABTScaledCost, which has an integer value of 1. Next is the proper Attr_ field. You will have one Attr_ field for every cost impedance in your network. Make sure to set the value for the right impedance. For example, if you are solving against TravelTime, then set your scale factor in the Attr_TravelTime field to 1000. If for some reason the solution above doesnâ??t work, then here are a couple of other options: Use a point barrier. You can get the midpoint of the feature, load that as a point barrier, and set FullEdge to true. This will restrict the entire edge. Do something to slightly alter the shape of the line you load. You could shrink in each end a little bit to avoid restricting the intersections.