LineOnAreaOverlayer is the way to go.
The _overlaps attribute will give you the number of lines in the area.
Thanks @erik_jan, works perfectly.
On a side note, if I wanted to retrieve other information, such as the total length, or the amount of edges with a specific attribute per polygon, I'm assuming this approach won't quite work?
The line on area overlayer will alter the original line geometry, if you don't wish to do this, a spatial relator should work. Areas into the supplier, lines into the requestor, the related suppliers count attribute will report how many intersects.
Although maybe you want the line lengths that overlap with the polygon? In which case you want to stick with the line on area overlayer
The line on area overlayer will alter the original line geometry, if you don't wish to do this, a spatial relator should work. Areas into the supplier, lines into the requestor, the related suppliers count attribute will report how many intersects.
Although maybe you want the line lengths that overlap with the polygon? In which case you want to stick with the line on area overlayer
I'm afraid this doesn't work, because if the areas are connected to the supplier port, then the output is the line feature. I need the polygons as an output, with counts and any other attribute info retrieved from the line features, based on intersections.
Even if I do swap these two ports around, the "suppliers count attribute" stays 0 for every entry.
Yes, typo on my part, should be areas into the requestor. What tests are you performing?
Yes, typo on my part, should be areas into the requestor. What tests are you performing?
Well, for example, the edges have an attribute called "Named" which is populated with either "Y" or "N". So above simply having the counts of lines in each polygon (Which I now have), I'd also like to know how many of those overlapping edges have Named = Y.
Also, the line segments already have a measurement attribute in Kilometres. The other thing I'd like is to know how many Kilometres of overlapping edge each polygon has.
In all these cases, my output remains the polygons. So in a perfect world, I have a polygon with attributes like "Count", "Total KM Edges" and "Named Edges count", all being info retrieved from the lined edges that overlap with each individual polygon. If that makes sense.
So sticking with the lineonline overlayer as that is working, you need to generate a list - Expand attribute accumulation, then expand generate list and enter a list name. You can then use a listsummer to add all the lengths for the related lines. Counting the list elements with a Y is a bit more involved, there are some transformers that deal with lists in the FME store that might be helpful.
So sticking with the lineonline overlayer as that is working, you need to generate a list - Expand attribute accumulation, then expand generate list and enter a list name. You can then use a listsummer to add all the lengths for the related lines. Counting the list elements with a Y is a bit more involved, there are some transformers that deal with lists in the FME store that might be helpful.
Oh wow, that works brilliantly. Thanks very much.
I think with this method it might even be possible to simply convert the "Y" & "N" of the Named attribute to 1 and 0, and get the counts in that way.
Either way, thanks a ton!