mark2atsafe wrote:
The more I think about that doubling of values, the more I don't like it. Basically, I'm trying to do binary bitwise arithmetic using decimal values. We could try and use a string of binary values and then the ampersand (&) operator in the Arithmetic Editor to do a bitwise AND (instead of the ListSummer). But at that point it's getting so complicated that there has to be a better solution.
Hi. Yeah, I think the key issue is just identifying which features overlap and in which groups. Sadly the FeatureRelator shares attribute information, but doesn't create any sort of group ID. My long-winded approach is the only way I can think of to create that group ID.
OK, here's another option. Run the lines through a Counter transformer (unless each feature already has a unique ID), then an Intersector transformer, then through a NetworkTopologyCalculator. Now you have groups of lines with a unique ID. You then pass that information back to the original feature with a FeatureMerger on the ID number:
Now you have a unique ID, you just run it through the part mentioned before:
- Add a Counter to give a new _count ID to everything, using Group-By = sum
- Add an AttributeManager or ExpressionEvaluator to multiply _count by 5
- Use the Offsetter to offset in the Z direction by _count
Here's a workspace that does that: https://github.com/FMEEvangelist/FMECommunity/raw/main/SupportFiles/OffsetOverlappingLinesVertically.fmwt
The only problem I can see is where two features are an identical copy of each other. But you could perhaps check for those before doing this part.
This, I think, is a much better solution than yesterday's!