This is a multi-step proces. It would include a lot of pre-generation preparation, like establishing some dimensions and a scale. Maybe you have a page format that the frame needs to fit to.
First you need to get the Bounding box of the feature/features you need to enclose in the frame (BoundingBoxReplacer/Accumulator) then buffer by the width of the frame and replace that with a bounding box. Clip exterior with interior and use the Outside port output to get only the frame polygon (with enclave).
Send Inside BBOX to a 2DGridAccumulator (Polygon grid, scale dependent width/height, seed 0,0).
Clip 2DGridAccumulator by frame polygon (with enclave) to get the graticule lines.
In paralel, use SpatialFilter to select 2DGridAccumulator output that intersects the perimeter of inside frame (2 SpatialFilters: Failed Containts Candidate + Passed Intersects Candidate).
In paralel Coerce inside frame to a line (GeometryCoercer).
LineOnAreaOverlayer with coerced line and filtered 2DGridAccumulator output.
Extract first and last coordinates of line output of LineOnAreaOverlayer.
Get round values of X and Y (if x or y is divisible by the scale denominator and graticule interval).
Label with X and Y round values and rotate X graticule text.
Move upper X and left Y text to fit in the frame.
Create Autocad specific attributes (layer name, text formatting).
I actually need something like this in the near future so I'll attach my workspace that you can build upon.
This is a multi-step proces. It would include a lot of pre-generation preparation, like establishing some dimensions and a scale. Maybe you have a page format that the frame needs to fit to.
First you need to get the Bounding box of the feature/features you need to enclose in the frame (BoundingBoxReplacer/Accumulator) then buffer by the width of the frame and replace that with a bounding box. Clip exterior with interior and use the Outside port output to get only the frame polygon (with enclave).
Send Inside BBOX to a 2DGridAccumulator (Polygon grid, scale dependent width/height, seed 0,0).
Clip 2DGridAccumulator by frame polygon (with enclave) to get the graticule lines.
In paralel, use SpatialFilter to select 2DGridAccumulator output that intersects the perimeter of inside frame (2 SpatialFilters: Failed Containts Candidate + Passed Intersects Candidate).
In paralel Coerce inside frame to a line (GeometryCoercer).
LineOnAreaOverlayer with coerced line and filtered 2DGridAccumulator output.
Extract first and last coordinates of line output of LineOnAreaOverlayer.
Get round values of X and Y (if x or y is divisible by the scale denominator and graticule interval).
Label with X and Y round values and rotate X graticule text.
Move upper X and left Y text to fit in the frame.
Create Autocad specific attributes (layer name, text formatting).
I actually need something like this in the near future so I'll attach my workspace that you can build upon.
Hi @caracadrian !
Thanks alot for your help!
I had to make all kinds of adjustments in the workspace to suit our needs,
But the basis you brought in the file you attached was excellent!
Thank you!