Skip to main content
Question

group by

  • February 26, 2020
  • 2 replies
  • 31 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

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+46
  • 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?