Boundary labeling is a technique in computational geometry used to label dense sets of feature points in an illustration. It involves placing labels along an axis-aligned bounding box and connecting each label with its corresponding feature point using non-crossing leader lines. Although boundary labeling is well-studied, semantic constraints on the labels have not been investigated thoroughly. In this paper, we introduce grouping and ordering constraints in boundary labeling: Grouping constraints enforce that all labels in a group are placed consecutively on the boundary, and ordering constraints enforce a partial order over the labels. We show that it is NP-hard to find a labeling for arbitrarily sized labels with unrestricted positions along one side of the boundary. However, we obtain polynomial-time algorithms if we restrict this problem either to uniform-height labels or to a finite set of candidate positions. Finally, we show that finding a labeling on two opposite sides of the boundary is NP-complete, even for uniform-height labels and finite label positions.
翻译:边界标注是计算几何学中用于在插图中标注密集特征点集的一种技术。该方法将标签沿轴对齐边界框放置,并使用非交叉引导线将每个标签与其对应的特征点相连。尽管边界标注已得到充分研究,但标签的语义约束尚未得到深入探讨。本文在边界标注中引入了分组约束与排序约束:分组约束要求同一组内的所有标签在边界上连续放置,排序约束则对标签施加偏序关系。我们证明,对于沿边界单侧任意位置放置的任意尺寸标签,寻找可行标注方案是NP难问题。然而,若将问题限制于等高度标签或有限候选位置集合,则可获得多项式时间算法。最后,我们证明即使在等高度标签和有限标签位置的条件下,在边界相对两侧寻找标注方案也是NP完全问题。