Skip to main content
Solved

Counting features based on difference in line overlay

  • March 1, 2017
  • 3 replies
  • 28 views

Hello,

Im new to FME, I can't find the solution to this problem in the knowledge base.

Im trying to count the purple horizontal lines in the picture as following: 5, 10, 15, 25 etc. I think this can be achieved with the counter transformer.

But when the underlying vertical line feature changes the counter has to reset.

Any advice would be of great help.

Best answer by jdh

If the underlying lines do not have a unique ID, use a Counter on them to create one.

Then use a SpatialRelator or SpatialFilter (merge attributes) to assign the lineUID to the hatches.

 

 

Then use a Counter on the hatches with the counter name set to the lineUID attribute.

 

 

That way the count of each hatch is grouped by each underlying line.
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.

3 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • March 1, 2017

Do the shorter lines have an attribute that relates them to the underlying lines?


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • Best Answer
  • March 1, 2017

If the underlying lines do not have a unique ID, use a Counter on them to create one.

Then use a SpatialRelator or SpatialFilter (merge attributes) to assign the lineUID to the hatches.

 

 

Then use a Counter on the hatches with the counter name set to the lineUID attribute.

 

 

That way the count of each hatch is grouped by each underlying line.

Thanks, that worked.