Skip to main content
Solved

How to resize polygons?

  • December 14, 2016
  • 4 replies
  • 188 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

View original
Did this help you find an answer to your question?

4 replies

takashi
Evangelist
  • December 14, 2016

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


itay
Supporter
Forum|alt.badge.img+17
  • 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+39
  • 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! :-)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings