Hi,
how about giving each polygon a unique ID (e.g. with a Counter) before the Intersector. You could then use this ID as a group by-clause for the AreaBuilder.
David
What polygon should have an unique ID? The buffer?
Maybe I should also state my original problem, maybe there is an other way of solving it.
I have a centerline and I have to create buffers on the left and right side of the line like this:
- 1 buffer runs from the centerline to 1m
- the 2nd buffer runs from the 1m line to 2m (so the buffer is again 1m wide and not 2m - it doesn't start from the centerline)
- and so on (depending on the attributes).
- (all buffers must be polygons not lines)
The steps I now take are:
- buffer the line at the maximum width
- use the offsetcurvegenerator to generate the lines and split them left and right
- use the intersector with the buffers and the generated curves
- use the areabuilder
But as said, the areabuilder doesn't return my expected results.
Maybe there is a tool that generates a one sided buffer (polygon), with no end_cape style? That would be a great step in the right direction.
Try to put the unique ID on the buffer polygon first and see what happens.
I recommend to read up on Group By clauses if you aren't familiar with them.
Here is an article that specifically uses the Intersector and the AreaBuilder as an example.
David
I think my problem has indeed something to do with the group by. Stil don't see how the group by with counter can help as the lines from the offsetcurvegenerator don't have this counter.
I have tried to simplify the problem a bit so I can test the results of groupby better.
Hi,
In my simple test, I couldn't reproduce shapes like the second image you posted. The combination of the Intersector and the AreaBuilder always creates shapes like the third image (i.e. expected result), except when I specified the 'Group By' parameter of those transformers. Did you specify the 'Group By' parameter of the Intersector and / or the AreaBuilder? If you did, try clearing them.
Takashi