We examine the computational complexity of cartographic label placement, a problem derived from the cartographer's task of placing text labels adjacent to map features in such a way as to minimize overlaps with other labels and map features. Cartographic label placement is one of the most time-consuming tasks in the production of maps. Consequently, several attempts have been made to automate the label-placement task for some or all classes of cartographic features (punctual, linear, or areal features), but all previously published algorithms for the most basic task|point-feature-label placement| either exhibit worst-case exponential time complexity, or incorporate incomplete heuristics that may fail to nd an admissible labeling even when one exists. The computational complexity of label placement is therefore a matter of practical signi cance in automated cartography. We show that admissible label placement is NP-complete, even for very simple versions of the problem. Thus, no polynomial time algorithm exists unless P = NP . Similarly, we show that optimal label placement can be solved in polynomial time if and only if P = NP , and this result holds even if we require only approximately optimal placements. The results are especially interesting because cartographic label placement is one of the few combinatorial problems that remains NP-hard even under a geometric (Euclidean) interpretation. The results are of broader practical signi cance, as they also apply to point-feature labeling in non-cartographic displays, e.g., the labeling of points in a scatter plot.
[1]
Stephen A. Hirsch,et al.
An Algorithm for Automatic Name Placement Around Point Data
,
1982
.
[2]
Ioannis G. Tollis,et al.
Planar grid embedding in linear time
,
1989
.
[3]
David S. Johnson,et al.
Computers and Intractability: A Guide to the Theory of NP-Completeness
,
1978
.
[4]
Christopher J. Van Wyk,et al.
How Hard Can It Be to Draw a Pie Chart
,
1990
.
[5]
E. Imhof.
Positioning Names on Maps
,
1975
.
[6]
L. W. Carstensen.
A Comparison Of Simple Mathematical Approaches To The Placement Of Spot Symbols
,
1987
.
[7]
Kenneth Steiglitz,et al.
Combinatorial Optimization: Algorithms and Complexity
,
1981
.
[8]
Steven Zoraster,et al.
INTEGER PROGRAMMING APPLIED TO THE MAP LABEL PLACEMENT PROBLEM
,
1986
.
[9]
Pinhas Yoeli,et al.
The Logic of Automated Map Lettering
,
1972
.
[10]
J. Roessel.
An Algorithm for Locating Candidate Labeling Boxes Within a Polygon
,
1989
.
[11]
Herbert Freeman,et al.
A PROGRAM FOR AUTOMATIC NAME PLACEMENT
,
1984
.
[12]
Christopher B. Jones.
Cartographic name placement with Prolog
,
1989,
IEEE Computer Graphics and Applications.