Skip to main content
Question

scale by group id

  • October 17, 2017
  • 4 replies
  • 19 views

geospatiallover
Participant
Forum|alt.badge.img+6

I have a group of features that are merged together into a spatial boundary (buffer of 25 feet) and I'd like to scale each group of features (lines included) from a known center point to a scale that would make each group more readable with labels. The number of groups varies from map to map. Each group is created as an inset map to a PDF. The brown diamond is where the center point is and the anchor point for my scaler. I wonder why the scaler transformer doesn't have a group by.

This post is closed to further activity.
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.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • October 17, 2017

Just thinking out loud:

Could you aggregate the objects, apply the scaling and then de-aggregate?

Using Aggregator (has a group by), Scaler and DeAggregator.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • October 17, 2017

calculate distance from centerpoint.

Use this to base your scaling on. Maybe use the desired fontsize as a modulus. (to prevent overlaps)

Either calculate scalevector per point (dx*cosAngle,dy*sin(angle)) or create lines form point to center (use a unconditional merge, or variablesetter/retriever to merge center to each pint) and scale those.

When having scaled liens, extract endpoint and place label.

Use this to base your scaling on. Maybe use the desired fontsize as a modulus. (to prevent overlaps)


geospatiallover
Participant
Forum|alt.badge.img+6
  • Author
  • Participant
  • 70 replies
  • October 17, 2017

calculate distance from centerpoint.

Use this to base your scaling on. Maybe use the desired fontsize as a modulus. (to prevent overlaps)

Either calculate scalevector per point (dx*cosAngle,dy*sin(angle)) or create lines form point to center (use a unconditional merge, or variablesetter/retriever to merge center to each pint) and scale those.

When having scaled liens, extract endpoint and place label.

Use this to base your scaling on. Maybe use the desired fontsize as a modulus. (to prevent overlaps)

Thanks @gio. I'll try this out. I got the scalevector approach but can you explain how the modulo counter can help me prevent overlaps on my text.

 

 

Another option popped out my head by running each group through a worker transformer by group id and then scale in the worker workspace and then loop back to the next group until it's done.

 

 


geospatiallover
Participant
Forum|alt.badge.img+6
  • Author
  • Participant
  • 70 replies
  • October 17, 2017

Just thinking out loud:

Could you aggregate the objects, apply the scaling and then de-aggregate?

Using Aggregator (has a group by), Scaler and DeAggregator.

I spoke too soon earlier. it works but scaling did not really fix any overlaps. I can use this with Gio's suggestion to produce a better result. Thanks!.