Skip to main content
Solved

How do I generalize a polygon border?

  • September 25, 2018
  • 3 replies
  • 111 views

Forum|alt.badge.img

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.

Best answer by takashi

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.

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

3 replies

takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • Best Answer
  • September 25, 2018

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.


Forum|alt.badge.img
  • Author
  • September 27, 2018
takashi wrote:

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

 

 

 

 


Forum|alt.badge.img
  • Author
  • September 27, 2018
takashi wrote:

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.

 

 


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