Skip to content Skip to sidebar Skip to footer

Unordered Cloud Point Of Polygon Contour To Polygon

Dear Stackoverflow community, I have contours of irregular polygons as unordered datapoints (like on the figure here: https://s16.postimg.org/pum4m0pn9/figure_4.png), and I am tryi

Solution 1:

look here finding holes in 2D point set for some ideas on how to solve this

  1. I would create point density map (similar to above linked answer)
  2. create list of all lines
    • so add to it all possible combination of lines (between close points)
    • not intersecting empty area in map
  3. remove all intersecting lines
  4. apply closed loop / connectivity analysis on the lines
  5. then handle the rest of unused points
    • by splitting nearest line by them ...
    • map example
    • depending on you map grid size and point density you may need to blend/smooth the map to cover gaps
    • if grid size is too big then you can miss details like on the image between points A,C
    • if it is too small then significant gaps may occur near low density areas

But as said this has more then one solution so you need to tweak this a bit to make the wanted output perhaps some User input for shaking the solution a bit until wanted solution found...

[notes]

you can handle this as more covex polygons ...

  • add line only if winding rule met
  • stop when no more lines found
  • start again with unused points
  • and in the end try to connect found non closed polygons ...

Post a Comment for "Unordered Cloud Point Of Polygon Contour To Polygon"