Skip to main content
Solved

Count

  • November 15, 2024
  • 4 replies
  • 82 views

deanhowell
Influencer
Forum|alt.badge.img+24

I have a layer that contains 2 point line features i.e. start and end only, and I want to convert the start and end to points but have a count that keeps the parts in order. For example the start of the first line has count of 1 and the end of that line a count of 2, then the next line, start point would be 3 and end point would be 4. 

Each line has an ID so was thinking to try and group the points by line ID and then apply the count but can’t get the grouping to work as expected.

 

 

 

Best answer by ebygomm

If you apply the count before you snip the lines to points, you can then just calculate a vertex count from that count

@Value(_count)*2 for the start points and @Value(_count)*2+1 for the end points

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.

4 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • November 15, 2024

From the Snippers, why not just use AttributeCreator with Adjacent Feature Processing to increment +2 for each Feature Point output?


 

 


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • November 15, 2024

If you apply the count before you snip the lines to points, you can then just calculate a vertex count from that count

@Value(_count)*2 for the start points and @Value(_count)*2+1 for the end points


geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • November 15, 2024

Something like this:

 


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • November 17, 2024

Thanks ​@bwn , ​@geomancer and ​@ebygomm 

I went with ​@ebygomm response but with a minor change @Value(_count)*2-1 for the start points and @Value(_count)*2 for the end points