Skip to main content

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

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


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.


Reply