list of barriers

947
8
09-21-2011 08:23 AM
JillianStanford
Occasional Contributor III
Hello,
I'm new to NA and trying to figure out if the following is possible:

I've got a network dataset of toll roads and I want to generate a route between an entry and exit point and then generate a list of toll plazas and their associated tolls along the route. I'm having no problem setting the toll plazas as cost barriers, generating the route and getting the accumulated toll but is there a way to get a list of barriers encountered along the route?

Ultimately I'll be accessing this as an ArcGIS Server service from Silverlight. There is a Barriers property returned by the RouteTask but it appears to be every barrier in the layer.

Is the only way to retrieve a list of barriers to do a separate spatial query?

Thanks!
Jill
Tags (2)
0 Kudos
8 Replies
JoeBorgione
MVP Emeritus
Hello,
I'm new to NA and trying to figure out if the following is possible:

I've got a network dataset of toll roads and I want to generate a route between an entry and exit point and then generate a list of toll plazas and their associated tolls along the route. I'm having no problem setting the toll plazas as cost barriers, generating the route and getting the accumulated toll but is there a way to get a list of barriers encountered along the route?

Ultimately I'll be accessing this as an ArcGIS Server service from Silverlight. There is a Barriers property returned by the RouteTask but it appears to be every barrier in the layer.

Is the only way to retrieve a list of barriers to do a separate spatial query?

Thanks!
Jill


Your barriers are a feature class right?  Can't you just select the current route and then do a spatial selection based of the barriers/tolls based on proximity to the current route? (Can't help you with silver light althought there is a guy lurking out there that probably can.  Alexey are you reading this?!)
That should just about do it....
0 Kudos
JillianStanford
Occasional Contributor III
Hi Joe,
Yep, I can definitely get them using a spatial query. I was just wondering if NA was able to output the list of barriers, I'm not familiar with all of it's capabilities yet.

Thanks for your reply!
Jill
0 Kudos
PatrickStevens
Esri Contributor
Hello, Jill!

You can use the traversal result for the route to generate all of the traversed edges and junctions.  The feature classes created here can help you find out where along the route you passed toll booths.

If you are on 10.1 beta, you can use the GP tool, Copy Traversed Source Features. For 10.0, install the Network Analyst Traversal Result Add-In.

After you solve your route, run the GP tool, or click on the Add-in to add the traversal results to your map.  You can determine the toll booths you passed by looking at the junction and edge feature classes that are created.

For each toll booth, represented by an additive cost point barrier, you will find 2 midspan junctions and a zero-dimensional line (a line where the from and the to position are identical).  In order to support measures on lines, the added cost of the point barrier is applied in the traversal result to the zero-dimensional line.  You should see a line with the same from and to, along with a value in the Attr_<name of your cost attribute> field that contains the cost that was added by the toll booth.

For example, say I have an additive barrier of cost $10 at the 0.5 position of edge that costs 2 minutes to traverse. I am solving on TravelTime, but accumulating toll costs. I would see in the Edges table (along with many other fields):

FromPosition - ToPosition - Attr_TravelTime - Attr_TollFees
0 - 0.5 - 1 - 0
0.5 - 0.5 - 0 - 10
0.5 - 1 - 1 - 0

You can see 3 edges.  The first and last entry are the cost of traveling from 0 to 0.5 and 0.5 to 1 along the edge.  The second entry is the $10 fee for the toll booth.

Hopefully, this helps.
0 Kudos
AlarconOrtega
New Contributor II
Thank Patrick, but I don`t think.

When i work with ArcGIS Server, and we request one route, we get json response, no NA layer.. However, GP with Copy Traversed Source Features tool, it has as  in parameter, NA Layer ¿ how do i pass this parameter ?


Thank you.
0 Kudos
PatrickStevens
Esri Contributor
Hello!

Do you have the same issue as Jill?  Are you trying to find out about additive cost barriers that you encountered along a route?  The reason I ask is that I want to make sure that trying to get to the traversal result is the best way to accomplish your goals?  What exactly are your goals?

Also, what version of server are you using?

Thanks
0 Kudos
AlarconOrtega
New Contributor II
Hello Patrick.

I want to calculate the costs associated with tolls. This cost depends on where you go in and out of highway tolls. I have a table that relates the id of the input edge  and output edge with toll costs. So I want to use this tool to get the id of edge and then, get toll cost at this route.

Thanks you.
0 Kudos
PatrickStevens
Esri Contributor
Let me make sure I understand some details.  You are solving the route against some kind of cost attribute that is either time or distance.  After the route is solved, you want a way to accumulate what tolls were paid along the way.  You don't care, necessarily, to avoid tolls, you just want to know how much was paid along the way.

Your toll information is stored in a table with edge IDs?  This is as opposed to using junctions, turns, or point barriers for tolls.

If I have the details right, here are a couple of suggestions:

Set up a cost attribute on your network, based on tolls paid.  Call it TollCost or something. When you solve your route against your regular cost attribute, say TravelTime, you can also accumulate TollCost.  You should get a Total_TollCost value with the output route.

Another idea, if you really want to use Traversal Result or accumulating doesn't work or you don't have access to edit your network attributes, would be to change your routing service.  Instead of just using the traditional route service, set up a GP model that solves a route, generates a traversal result and perhaps does some analysis on tolls before returning an answer.

The best answer really depends on how you model the toll costs along with performance and client/server processing expectations.

Did this help?
0 Kudos
AlarconOrtega
New Contributor II
Thank you, Patrick

I will try the second options, but I worry about the performance of GP Model vs NAServer.


I will tell it you.

Thank you very much. ¡¡

Muchísimas gracias.
0 Kudos