Skip to main content

In my workflow, I want to evaluate the intersection of a circle with a set of lines, extract the vertices, do some calculations, then store just the text results in a table. The set of lines remain the same but a new circle is created for each intersection analysis using a different circle center. There are 200,000+ circles whose intersections with the set of lines that need to be evaluated.

The workflow I created works for a single circle (using the Sampler to extract the circle) but when I want to evaluate multiple circles, the all start to overlap which doesn't provide the desired results.

How can I run the intersection of the circle with the line set one at a time and write out just the text results for each circle? I tried GroupBy in the Sampler2 but didn't get the desired results. I'll try to have the image and workflow posted with the question.

@gcarmich perhaps attach a sample dataset for community members to view and experiment with.


@gcarmich perhaps attach a sample dataset for community members to view and experiment with.

I still can't upload files to the FME Community. I sent the workflow and an image to your email. Can you post for me?


need_to_process_one_by_one.fmw


The Group By needs to go on the LineOnLineOverlayer.
  1. Create a "CircleID" Attribute on the circles with a Counter if there isn't one already
  2. Create a separate "JoinField" Attribute on both the Circles and the Lines, and just set to a Dummy value like 1
  3. Use FeatureJoiner to join the the Lines to the Circles to create multiple Groups of the same Lines. The output of this will be multiple sets of the same Lines, but now each set of Lines will have their own CircleID to match the individual Circle they are grouped with
  4. In LineOnLineOverlayer, use the CircleID as the Group By Attribute. This ensures that each Circle and Lines Group is processed independently

 


need_to_process_one_by_one.fmw

not_all_points_showing.fmwI made the changes suggested. When I run it using a sample of 10 circles, the LineOnLineOverlayer takes in 30 objects (10 circles x 3 lines) but only outputs 10 intersections. Each circle should intersect each of the 3 lines once and therefore produce 3 intersection points. How do I set the LineOnLineOverlayer to output all intersections for each circle?process_one_by_one2.JPG


not_all_points_showing.fmwI made the changes suggested. When I run it using a sample of 10 circles, the LineOnLineOverlayer takes in 30 objects (10 circles x 3 lines) but only outputs 10 intersections. Each circle should intersect each of the 3 lines once and therefore produce 3 intersection points. How do I set the LineOnLineOverlayer to output all intersections for each circle?process_one_by_one2.JPG

That's because the workspace is set to send 3 x 10 = 30 Circles to LineOnLineOverlayer. What you want it to do is send: 10 Circles + 10 x 3 Lines.

Much like this:

As an aside, you'll find AttributeCreator easier to create values with rather than StringConcantenator.


That's because the workspace is set to send 3 x 10 = 30 Circles to LineOnLineOverlayer. What you want it to do is send: 10 Circles + 10 x 3 Lines.

Much like this:

As an aside, you'll find AttributeCreator easier to create values with rather than StringConcantenator.

It seems to be working but it is also returning the vertex where the 3 lines come together. I can easily delete that point but I'm curious why it is appearing. I'll also need to study the process because I don't fully understand it. Thank you.

 

remaining center vertex.JPG


It seems to be working but it is also returning the vertex where the 3 lines come together. I can easily delete that point but I'm curious why it is appearing. I'll also need to study the process because I don't fully understand it. Thank you.

 

remaining center vertex.JPG

The reason is because LineOnLIneOverlayer looks for any intersections of Lines in the Group. That will include intersections between the Lines themselves. Usually these can be filtered out by these not having an Attribute that only exists on the Circles.

The methodology as to why it works is because "Group By" mode in a Transformer treats each set of Features as an independent Group of Features to be processed independently of each other. What the above workflow does is group together 3 Lines for every Circle by giving the Lines the same "CircleID"

Note, an alternate way for this particular problem that avoids Groups is to instead use a Transformer with separate Base and Candidate input ports, like NeighborFinder


Reply