I am using an aggregated object to insert a cell using the dgnstyler. The aggregated object has 2 geometries, a point and a line. I need to use the line as a reference for the angle of the cell rotation, but I do not know how to derive an angle for this line. Can someone help me find a way to do this?
What transformers would I need to use to reference as the cell rotation angle in the dgnstyler?
Best answer by fmelizard
This one was too interesting. I had to bite. I must ask, where is that original geometry coming from? Smallworld perchance?
In any case, given that you're starting with an aggregate and you want to end with a point and a rotation, it raises an interesting problem. How do you split things up, keeping what you need handy, without resorting to some kind of evil FeatureMerger, which will block things up, downstream.
I realized that you can tuck away the original geometry conveniently with a GeometryExtractor, and then Deaggregate followed by a GeometryFilter to keep only the piece you need. Then extract what you need from it, and then you can put back the whole original geometry with a GeometryReplacer, and then repeat but the second time keep the other piece. Works great. No blocking. Just some features being Deaggregated and destroyed 'cause they're unwanted a couple of times.
Never had done this trick before. Worked great. Plus it was a great test of the FME 2016 release candidate we're fussing about these days.
Screen shot below, FME 2016 workspace attached - pointlinerotationcalculator.fmw
The technique should work with FME 2015 as well, but some of the transformers may be a bit differently named so you'd need to recreate those parts if you tried to open this workspace with an older FME. (Generally not recommended).
Good luck.

It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.



