Solved

How to resize polygons?

  • 14 December 2016
  • 4 replies
  • 25 views

Badge

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

icon

Best answer by ebygomm 14 December 2016, 12:11

View original

4 replies

Userlevel 2
Badge +17

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

Badge +16

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

Badge +10

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

Badge

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

Reply