How levels of dangerousness can be set for barriers?

1169
2
08-19-2016 02:43 PM
Pedro_LuizCumino
New Contributor

Is that any way to set different weight or importance of barrier on a map? I wonder if it's possible to set different kinds of barriers in terms of levels of dangerousness. For instance, if only one of two different routes can be chosen. However, both routes have 1 barrier each. On route A the barrier has level 1 of dangerousness and the barrier on route B has level 2 of dangerousness. So the route A would be chosen due to its lower dangerousness level.

I'm using polygon as barriers as shown in the picture below.

Tags (2)
0 Kudos
2 Replies
ReneRubalcava
Frequent Contributor

You'd still need to have both routes, but then you'd need some other data to measure against. Something like maybe sidewalks, street lights, maybe crime reports. Then you could use the geometry engine to find which datasets impact which routes and determine a way to weight those values to determine a level of "dangerousness". It's not specifically built into the API to do this, but the tools to accomplish this are there. It's just about putting them together.

0 Kudos
Pedro_LuizCumino
New Contributor

So I have the report coming from an external service, which comes as a JSON object. It informs me the location where an issue is present and must be considered when calculating the route, like a cost to the lane stretch pointed by the latitude and longitude from the issue JSON object. The issues are classified as highmedium or low level. I need to set this cost to the lane stretch and then compare if it's worthwhile to select the late stretch where the issue is present or if select another route is a better decision.

How open is the route solver service in order to implement this kind of cost over a route? The idea at the end is to select the lower cost route by comparing the issue level, the time travelling and the travelled distance using my own algorithm.

What I've seen so far were these links below. However, I'm struggling to understand if it can be or not implemented using the Javascript API.

RouteParameters-amd | API Reference | ArcGIS API for JavaScript 

RestrictionAttributes Property 

Using parameters with network attributes—Help | ArcGIS for Desktop 

This is the given example of restriction. But how it is implemented as a restriction when calculating the route?

routeParams.attributeParameterValues = [{
attributeName: "Restriction",
parameterName: "25 MPH",
value: "2.5"
}];

Thanks in advance!

0 Kudos