Skip to main content
Question

group by

  • February 26, 2020
  • 2 replies
  • 19 views

Forum|alt.badge.img

HEllo,

I want to create an attribute (distance) between two points. I am using AttributeCreator to do it. Here is the code:

@Evaluate(@sqrt((@Value(feature[+1].y)-@Value(y))*(@Value(feature[+1].y)-@Value(y))/(@Value(feature[+1].x)-@Value(x))*(@Value(feature[+1].x)-@Value(x))))

The problem is that I want to calculate it only between points where lineID is the same. How can I add a kind of group by?

Thanks

2 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • February 26, 2020

You can use a conditional statement in the attributecreator, if @Value(LineID) = @Value(feature[+1].LineID) use the above expression, if not do nothing


Forum|alt.badge.img+2
  • February 26, 2020

@gylona or perhaps try the NeighborFinder?


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