有什么方法可以简化CGAL的折线,使其适用于内部/共享边界? [英] Is there any way to get CGAL's polyline simplification to work for inner/shared boundaries?
问题描述
This is a screenshot of South Korea after line simplification with CGAL.
我通过将每个多边形添加到 CGAL :: Constrained_triangulation_plus_2< CDT>中来简化行.ct
,然后运行 CGAL :: Polyline_simplification_2 :: simplify(ct,Cost(),Stop(0.5));
.
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?
我还尝试过分别对每个多边形进行 simplification
(简化),然后将它们组合在一起以形成整个国家.但是,问题是每个多边形将自己简化,因此,如果 Polygon1
得到简化,则不能保证相邻的 Polygon2
的共享顶点将重新定位.与 Polygon1
的顶点相同的坐标,因此在将它们放回一起时会发生相交,就像在这张韩国地图上一样.
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.
谢谢.
推荐答案
在您编写共享边界"时,我猜他们在那里两次,每个省一次.您必须在三个省的汇合处分割省-多边形,并且然后仅采用两个共享边界之一.
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.
这篇关于有什么方法可以简化CGAL的折线,使其适用于内部/共享边界?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!