0

Is there a way to prefer straight roads in network analyst rather than going through zigzag routes (i.e creating straight forward routing instead of really going through the shortest path)?

I am creating a wayfinding map and want to keep directions straight.

enter image description here

In this example, I want to go from point 1 to point 2 but I don't want to route through the diagonal road(cross). I am not allowed to manipulate time on the network and I cannot block the diagonal road. I prefer to use the other road (with more vertices and longer) is there a way to do this?

1
  • Thank you for editing the question. Fairly new to GIS stack exchange. Slowly learning. Thanks for the suggestions. But anyone has an answer for my question ?
    – Mo Ask
    Commented Oct 30, 2014 at 23:45

1 Answer 1

1

The way that I would try to answer your original question is to add a field to your roads and update it with a count of vertices.

  1. Add a Long Integer field
  2. Calculate that field using the Python parser to be equal to !shape.pointcount!,

You can then use the vertex count field as, or to contribute to, your impedance field.

You'll need to think about whether an almost straight road with lots of vertices should be treated as "straight" for your purposes, and maybe also about how you will deal with roads that consist of many lines.

@user30184 has offered some very useful advice as a comment that I will append here:

Probably it would be best to clean the roads from unnecessary dense vertices by simplifying. Alternatively you can think about other measures like a ratio of mathematical distance from the start node to end node vs. the length along the road or something like that.

3
  • Thank you. Could you please tell me how i can update fields with a count of vertices?
    – Mo Ask
    Commented Oct 30, 2014 at 22:10
  • You should really research/ask that as another question, but here is an answer here that describes the process gis.stackexchange.com/a/39165/115 I wrote a Count Vertices a number of years ago and posted it to Esri's Geoprocessing Gallery. Although I can no longer quickly locate it the crux was 1.Add a Long Integer field 2.Calculate that field using the Python parser to be equal to !shape.pointcount!,
    – PolyGeo
    Commented Oct 30, 2014 at 22:20
  • Probably it would be best to clean the roads from unnecessary dense vertices by simplifying. Alternatively you can think about other measures like a ratio of mathematical distance from the start node to end node vs. the length along the road or something like that.
    – user30184
    Commented Oct 30, 2014 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.