Skip to main content

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.

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


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.


Reply