Solved

How do I generalize a polygon border?

  • 25 September 2018
  • 3 replies
  • 47 views

Badge

So I have a footprint of a building as a polygon. I want to generalize the border of that polygon by either clipping away thin parts of it or removing canals in it (not holes for that i use DounutHoleExtractor).

The process i want can be examplified as follows:

->->

So basically if the with of a line is less then 2 meter i want to smooth it out. At first i tried to use the "Generalize"-transformer but wasn't able to configure it properly.

icon

Best answer by takashi 26 September 2018, 00:41

View original

3 replies

Userlevel 2
Badge +17

Hi @hadhafang, three Bufferers (Corner Style: Miter, Miter Limit: 2 (> square root of 2)) might help you.

  1. Bufferer 1 (Buffer Amount: -1): Erase the narrow parts (width is less than 2).
  2. Bufferer 2 (Buffer Amount: 2): Fill up the narrow canals (width is less than 2).
  3. Bufferer 3 (Buffer Amount: -1): Restore remaining border to the original size.

Badge

Hi @hadhafang, three Bufferers (Corner Style: Miter, Miter Limit: 2 (> square root of 2)) might help you.

  1. Bufferer 1 (Buffer Amount: -1): Erase the narrow parts (width is less than 2).
  2. Bufferer 2 (Buffer Amount: 2): Fill up the narrow canals (width is less than 2).
  3. Bufferer 3 (Buffer Amount: -1): Restore remaining border to the original size.

Thank you @takashi.

 

I changed the process some, so the canals weren't a problem anymore.

 

Therefore I only used buffer one to remove the lines and buffer three to restore the polygon. I also used a buffer amount one thousand times bigger because the workspace is in millimeter.

 

Buffer one:

 

 

Buffer three:

 

 

When I did this some new problems arose:

 

Buffer One (the greyish area) created some strange triangles out of the original extent that Buffer three (the turquise area) then expanded upon. Witch meant that the original polygon got a very strange shape. If the miter setting was in the thousends the whole thing broke more

 

 

 

 

Badge

Hi @hadhafang, three Bufferers (Corner Style: Miter, Miter Limit: 2 (> square root of 2)) might help you.

  1. Bufferer 1 (Buffer Amount: -1): Erase the narrow parts (width is less than 2).
  2. Bufferer 2 (Buffer Amount: 2): Fill up the narrow canals (width is less than 2).
  3. Bufferer 3 (Buffer Amount: -1): Restore remaining border to the original size.

Thank you again @takashi

 

after writing my comment i revorket buffer to 250 millimeters and the miter limit to 16 and that did the trick. Now it looks good.

 

 

Reply