问题
I've been trying to carry out line simplification on polygons belonging to maps with the help of this CGAL guide, e.g. South Korea.
This is a screenshot of South Korea after line simplification with CGAL.
I carried out the line simplification by adding each polygon to CGAL::Constrained_triangulation_plus_2<CDT> ct
and then running CGAL::Polyline_simplification_2::simplify(ct, Cost(), Stop(0.5));
.
The outer boundaries will get simplified but the inner/shared boundaries (between provinces) will not. Is there any way to get the inner/shared boundaries simplified too?
I've also attempted to simplify
each polygon individually and then combining them back together to form the whole country. The issue, however, is that each polygon would get simplified on its own, and so if Polygon1
gets simplified, there's no guarantee that the shared vertices of the adjacent Polygon2
will relocate to the same coordinates as Polygon1
's vertices, and so intersections occur when you put them back together, as will happen with this South Korea map.
Thank you.
回答1:
As you write "shared boundaries" I guess they are there twice, once seen from each province. You have to split the province-polygons where three provinces meet, and then only take one of the two shared boundaries.
来源:https://stackoverflow.com/questions/64779837/is-there-any-way-to-get-cgals-polyline-simplification-to-work-for-inner-shared