Skip to main content
Solved

Counting features based on difference in line overlay


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.
View original
Did this help you find an answer to your question?

3 replies

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

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


jdh
Contributor
Forum|alt.badge.img+28
  • 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.


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