Skip to main content
Solved

How to resize polygons?

  • December 14, 2016
  • 4 replies
  • 221 views

Forum|alt.badge.img

Dear FME community,

I have a MapInfo text dataset and created polygons which are the bounding box around that text. The problem is that the polygons have different heights. What I want is that the height of the areas is the same. The length of the area can vary according to the text length.

For example: The bbox of "NL Plauen" in the lower left should be as high as the bbox of "NL Zschopau" in the center (in the image it is slightly smaller). Or another one: The three areas of "Stadt Leipzig", "Stadt Chemnitz" and "Stadt Dresden" should be the same height. Because of the different sizes of the letters, the BoundingBoxReplacer creates different polygons.

I already tried it with the bufferer, but this one increases the size at every side. I only want to increase the height, not the length.

Any ideas of how this can be achieved?

Kind regards and many thanks

Thomas

Best answer by ebygomm

I normally use a bounds extractor followed by a a 2d box replacer sort of thing, using an arithmetic expression to set the min y and max y values

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

takashi
Celebrity
  • December 14, 2016

Hi @thomask, I think the Scaler can be used here.


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • December 14, 2016

Agreed you can extract the text details and use that to re-scale them into a common size.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • December 14, 2016

I normally use a bounds extractor followed by a a 2d box replacer sort of thing, using an arithmetic expression to set the min y and max y values


Forum|alt.badge.img
  • Author
  • December 14, 2016

Thank you all! I used a combination of BoundsExtractor, ExpressionEvaluator (to calculate _ymax - _ymin) and 2DBoxReplacer (for the new geometry). It works perfectly! :-)