AnsweredAssumed Answered

How to indicate scaled cost polygon barrier in ArcGIS Runtime .NET

Question asked by lyap8408 on Jul 22, 2015
Latest reply on Mar 2, 2016 by FGibson-esristaff

Hi,

 

I am using ArcGIS Runtime for .NET, 10.2.6, and using LocalRouteTask to execute routing analysis.

I would like to indicate some scaled-cost polygon barriers for routing.

 

I had created a set of polygon barriers to be added to the route analysis, and then added the following attributes:

- polygonGraphic.Attributes[BarrierType] = 1;

 

Adding this line do allow me to route across the polygon barriers. Then, to consider the scaled cost, I had tried adding the following attributes (my impedance attribute is "Length"):

- polygonGraphic.Attributes["Attr_Length"] = 2;

- polygonGraphic.Attributes["Length"] = 2;

 

The returned result, do show a route across the barrier, but I am not sure if the cost were actually considered.

Checking the attributes of the polygonbarriers:

- RouteResult.PolygonBarriers[index].Attributes["AddedCost"] : always an empty dictionary

- RouteResult.PolygonBarriers[index].Attributes["Status"] : always 0

- RouteResult.PolygonBarriers[index].Attributes["BarrierType"] : value=1.

 

Any advice? Thanks in advance.

Outcomes