Skip to main content
Solved

Assigning a value to roadnetwork at most 15 mile breaks along roads

  • June 19, 2020
  • 2 replies
  • 8 views

Hello,

I'm currently working on a road network of ~3000 miles and some roads can go for 100 miles+

 

I'm looking to assign a value if the roadname is the same and the accumulative distance is 15 miles at most.

 

So 1 road for example can be shown by 6 segments

 

0-3

3-10

10-14

14-20

20-28

28-35

In the scenario above I would like 0-14 in 1 group as it is below 15 miles, then 14-28 in the second group and 28-35 in the next group.

 

Currently a part of the workbench that works on assigning this is:

However the issue I'm coming across is after 15 since the accumulative number is beyond 15 but the sum of 2 segments may still be below 15 miles. I'm not sure how to reset it as a reset would assign the whole road the same value.

 

I'm a little stuck here and could really use some help

Best answer by ebygomm

If you had the cumulative distance you could assign a group using an arithmetic expression

@Evaluate(@ceil(@Value(cumulative)/15))

*use @floor instead of @ceil if you want the groups to start from 0

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • June 19, 2020

If you had the cumulative distance you could assign a group using an arithmetic expression

@Evaluate(@ceil(@Value(cumulative)/15))

*use @floor instead of @ceil if you want the groups to start from 0


  • Author
  • 15 replies
  • June 19, 2020

If you had the cumulative distance you could assign a group using an arithmetic expression

@Evaluate(@ceil(@Value(cumulative)/15))

*use @floor instead of @ceil if you want the groups to start from 0

Thanks I was able to assign the correct identifier thanks to this.