If i'm reading this correctly, you want to clone a rectangle and offset it by its width/length so that it forms a square?
If so, I believe the following would work - in theory:
- Get centrepoint
- Locate distance you want to shift the rectangle
- Potentially via GeometryCoercer to make area to line
- Chopper to chop into 2 vertex lines
- LengthCalculator
- Sorter -> Sampler to find shortest length
- Locate angle you want to shift the rectangle
- Cloner to duplicate original rectangle. (Emphasis on original)
- Offsetter to offset cloned rectangle by distance and angle.
Thanks for the response.
The final solution implemented was:
-TopologyBuilder instead of GeometryCoercer to break down the polygon. (GeometryCoercer couldn't change to lines for some reason)
-SpatialFilter to pick the right line which crosses a seperate reference box.
-CenterOfGravity replacer on spatial filter results.
-coordinateExtractor.
-Then I had to use featureHolder for the next step of combining the reference point and the original source
-Aggregator with a grouping based on an attribute part of the polygons and point.
-Rotater with 180degrees and attirbutes X/Y points refering to the previous coordinateExtrator.
Viola.