Skip to main content
Solved

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


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

View original
Did this help you find an answer to your question?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 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


ebygomm wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings