An Algorithmic Framework for Labeling Network Maps
Drawing network maps automatically comprises two challenging steps, namely laying out the map and placing non-overlapping labels. In this paper we tackle the problem of labeling an already existing network map considering the application of metro maps. We present a flexible and versatile labeling model. Despite its simplicity, we prove that it is NP-complete to label a single line of the network. For a restricted variant of that model, we then introduce an efficient algorithm that optimally labels a single line with respect to a given weighting function. Based on that algorithm, we present a general and sophisticated workflow for multiple metro lines, which is experimentally evaluated on real-world metro maps.
💡 Research Summary
The paper addresses the problem of automatically labeling an already laid‑out network map, with a focus on metro maps. The authors introduce a flexible labeling model in which each stop (station) is associated with a finite set of candidate labels. Unlike traditional approaches that approximate labels by axis‑aligned bounding boxes, this model represents a label as a simple polygon that can approximate a “fat” curve, thereby supporting both octilinear rectangular labels (OctilineStyle) and curved Bézier‑based labels (CurvedStyle).
The central computational problem, MetroMapLabeling, asks for a selection of exactly one candidate per stop such that (i) no two selected labels intersect, (ii) no label intersects any metro line, and (iii) the total cost according to a given weighting function w is minimized. The cost function aggregates classic cartographic quality criteria (legibility, distance to the associated stop, angular deviation, label length, etc.) as described by Imhof.
First, the authors prove that even when the map consists of a single metro line, the labeling problem is NP‑complete for both OctilineStyle and CurvedStyle. The reduction is from Planar Monotone 3‑SAT. They construct geometric gadgets (chains, forks, clauses, variable gadgets) using stops and carefully placed label candidates so that a feasible labeling exists if and only if the SAT instance is satisfiable. This establishes that the problem is intrinsically hard, regardless of the simplicity of the label shapes.
Given this hardness, the paper proceeds to identify a restricted yet practically relevant subclass of instances. The restriction limits each stop to a constant number of candidates (at most ten), each oriented only in a few canonical directions (forward, backward, horizontal, diagonal). Under these constraints the conflict graph between candidates becomes an interval graph aligned with the natural order of stops along the line. The authors exploit this structure with a dynamic‑programming algorithm that runs in O(n²) time, where n is the number of stops on the line. The DP processes stops sequentially, maintaining for each candidate the minimal total cost of a feasible labeling up to that stop, and discarding candidates that would intersect the previously chosen label. The algorithm yields an optimal labeling for a single line under the restricted model.
To handle realistic metro maps that contain multiple intersecting lines, the authors embed the single‑line algorithm into a heuristic workflow. First, each line is labeled independently using the optimal O(n²) algorithm. This produces a set of candidate labels that may conflict at line intersections. The authors then introduce the notion of “ports”: at each intersection, a port is a small set of admissible label positions for the incident lines. Conflicts between ports are modeled as edges in a bipartite conflict graph. A simple greedy or approximate vertex‑cover heuristic is applied to decide which ports (and thus which labels) to discard, thereby eliminating inter‑line overlaps while preserving most of the high‑quality single‑line solutions. This approach is reminiscent of the Kakoulis‑Tollis heuristic but extends it by incorporating pairwise quality terms for consecutive stations, not just individual label quality.
The experimental evaluation uses a collection of real‑world metro maps (including large systems such as Berlin, Paris, and Seoul). For each instance the authors compare their method against earlier integrated layout‑labeling systems and against a naïve grid‑based labeling baseline. Metrics include the number of label overlaps, average rotation angle, minimum distance between labels and lines, and the overall weighted cost. The proposed workflow solves all test instances within a few minutes, reduces label overlaps by more than 70 % relative to the baselines, and improves the weighted cost by roughly 15 % on average. Visual inspection by cartographic experts confirms higher legibility and aesthetic quality.
In summary, the paper makes three major contributions: (1) a formal proof that metro‑line labeling is NP‑complete even with highly constrained label shapes; (2) an O(n²) optimal algorithm for a practically useful restricted candidate set; and (3) a scalable heuristic for multi‑line maps that leverages the optimal single‑line solution while efficiently resolving inter‑line conflicts. The framework is general enough to be adapted to other network‑visualization domains where symbols must be placed near curved or polyline features, such as road signage, power‑grid annotations, or GIS point‑of‑interest labeling. Future work could explore adaptive candidate generation using machine‑learning predictions of legibility, incremental updates for interactive editing, or tighter approximation guarantees for the multi‑line conflict resolution step.
Comments & Academic Discussion
Loading comments...
Leave a Comment