Polygon Border Processing

Common borders

Given poly1 and poly2, they are neiboring polygons, but they may not share the same border, i.e., the space between these two polygons are vacant, and we want to extend the area of these two polygons till they share the same border

Strategy 1:

for each pair of points in poly1 and poly2, if dist(pair of points) are closer than $\epsilon$, move both of them to central point

Strategy 2:

  1. find a LineString in poly2
  2. for each Point in ploy1, if Point is closer than $\epsilon$ to that LineString, then move point onto LineString

Simplify

  • for any 2 consecutive line segment, if their slope diff is less than $\epsilon$, remove center point / common point
  • for any adjacent 2 points in polygon, if dist(p1, p2) is less than $\epsilon$, replace points with mid-point

In [ ]: