1 / 65

Label placement

Label placement. Rules, techniques. Labels on a map. Text, name of map features No fixed geographical position Labels of point features (0-dim), line features (1-dim), areal features (2-dim). Labels of point features. Cities on a small-scale map Heights of peaks

nansen
Télécharger la présentation

Label placement

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Label placement Rules, techniques

  2. Labels on a map • Text, name of map features • No fixed geographical position • Labels of point features (0-dim), line features (1-dim), areal features (2-dim)

  3. Labels of point features • Cities on a small-scale map • Heights of peaks • Measured values at measurement points

  4. Labels of point features Touristic sights, campgrounds

  5. Labels of line features • Rivers • Heights on contour lines • Streets

  6. Labels of line features

  7. Labels of line features

  8. Labels of line features

  9. Labels of areal features • Countries, oceans, forests, lakes

  10. Labels of areal features

  11. Labels of areal features

  12. Three kinds of labels Dordogne Utrecht O v e r i j s s e l Nieuwegein Houten Culemborg Straight, horizontal name Curved name Spacing between characters

  13. Label placement • Where should the text be placed? Which shape? • 20% - 50% of the manual map production time;can be automated • Which rules do cartographers use?- No overlap  readability- Clear for which feature  association- Aesthetical guidelines

  14. Rules according to Imhof Eduard Imhof (1895-1986) • Swiss Cartographer • “Positioning Names on Maps” (1962/1975) Example

  15. Problematic cases Problem association Thunder Bay and point Problem visibility highway 20 Problem readability name

  16. Another problematic case University Ave. is interrupted 4 times

  17. Specific rules point labels • Label must be close to point, preferably to right and above • Labels are placed horizontal, no extra spacing • No overlap with other labels, except perhaps in the spacing of the areal label • Label may intersect line feature; then line must be interrupted • Points at a large body of water must have their label in the water. In other cases there may be no line between a point and its label • If it cannot be avoided, a name may be split over two lines of text

  18. Specific rules line labels • Label must follow shape of river • Label should not bend upwards and downwards consecutively • At long line features the label must be repeated • No or little extra spacing between characters, spacing between words of the label is allowed • For vertical line features: upward reading direction left on the map and downward right on the map • Contour lines: labels must interrupt contour line; top of label points to higher regions

  19. Specific rules areal labels • Horizontal labeling is good unless this conflicts with the dominant shape of the region • Non-horizontal labels must be curved • Monotonous curving; no inflection points • Label should be spread over whole region • Adjacent regions preferably have same shape of label (both horizontal, e.g.) • Sometimes an areal label may be outside its region, but not in another labeled region • Small areal features treated as point features

  20. Strategies for automatic label placement • Compute for each feature various candidate positions according to the rules • Choose for each feature one candidate position, such that the chosen positions do not overlap • Sometimes a feature cannot be labeled, and sometimes the label of a feature must be repeated

  21. Candidate positions points • Point labels 8-position model 4-position model slider model More general model  more labels can be placed, but more complex/ expensive to compute

  22. Candidate positions points • Priority of point label positions 2 1 4 1 2 5 1 Imhof Jones Yoeli, Hirsch 5 4 5 2 3 6 3 4 6 3 3 1 9 7 3 1 2 Ebinger Zoraster 5 4 8 6 7 4 2 10 8

  23. Gua quiv d l r a i Candidate positions lines • Compute strip with character height above the river which follows the shape approximately, but doesn’t have too high curvature (e.g. with opening, closure) • Determine suitable segments in the strip as candidates

  24. Candidate positions regions • Determine skeleton (medial axis) of region (polygon) • Determine longest path on skeleton as dominant shape • Choose middle with suitable character spacing • Vary a little for more candidates

  25. B e l g i ë Candidate positions regions, horizontal • Choose spacing and determine length : height of label • Compute largest scaled copy of the label (rectangle) that just fits inside the polygon • Put the label in the correct font size in the middle of the scaled copy B e l g i ë B e l g i ë

  26. Removal part of the candidates • Compute those candidate positions that intersect map features significantly, or would give unclear association, and remove them Nieuwegein Nieuwegein Nieuwegein poor poor good

  27. Utrecht Utrecht Reasons forremoval Utrecht poor Zeist Zeist good Utrecht Utrecht Utrecht Readability text Visibilityfeatures Association

  28. Choosing from the candidates • Translate to a graph problem (graph G):- each candidate position of each feature is a node in G- two nodes have an edge in G if their candidate positions intersect- two nodes have an edge in G if their candidate positions are of the same feature

  29. Example Utrecht Utrecht Bunnik Bunnik Utrecht Utrecht Bunnik Bunnik Langbroeker Wetering Langbroeker Wetering

  30. Computing intersecting candidates • Each candidate is (approximately) a simple geometric shape • Determine all pairs of intersecting candidates using a plane sweep algorithm • O((n+k) log n) time, with k the number of intersecting pairs • Typically: k = O(n)

  31. Graph problem: maximum independent set • Independent set: Set of vertices W with for all v, wÎ W: {v,w} Ï E. • Maximum independent set problem: find largest independent set • Clique: Set of vertices W with for all v, wÎ W: {v,w} Î E. Independent Set Clique

  32. Graph problem: maximum independent set • Also called maximum stable set • NP-hard problem: solving optimally is very time consuming • Cannot be approximated with performance guarantees • Many heuristics Independent Set

  33. Heuristics for maximum independent set • Select each candidate that is only adjacent to a clique, and remove the candidate and clique from the graph • Repeat as long as possible (optimal selections)

  34. Heuristics for maximum independent set • Select each candidate that is only adjacent to a clique, and remove the candidate and clique from the graph • Repeat as long as possible (optimal selections)

  35. Heuristics for maximum independent set • Select each candidate that is only adjacent to a clique, and remove the candidate and clique from the graph • Repeat as long as possible (optimal selections)

  36. Heuristics for maximum independent set • Select each candidate that is only adjacent to a clique, and remove the candidate and clique from the graph • Repeat as long as possible (optimal selections)

  37. Heuristics for maximum independent set • Select each candidate that is only adjacent to a clique, and remove the candidate and clique from the graph • Repeat as long as possible (optimal selections) Utrecht Bunnik Langbroeker Wetering

  38. Heuristics for maximum independent set • Select each candidate that is only adjacent to a clique, and remove the candidate and clique from the graph • Repeat as long as possible (optimal selections) • Select candidate that intersects few other candidates • Select candidate if a feature has only one(or a few) candidates left • Eliminate candidates that intersect many candidates

  39. Refinements • Features and labels have different importances • Candidates can have different priority  translate problem to maximum weight independent set • First place areal labels, then determine candidate point labels and select, then determine line labels and place them(order of decreasing freedom of placement)

  40. Labels in GIS • Can label positions be pre-computed and stored, for better efficiency?No, because • Which themes are shown is not known beforehand; • Which scale and size of the map is needed is not known beforehand

  41. Labels on interactive maps • Pop-up labels, or labels only after click • During zooming in, remove labels when their feature goes outside the frame • During zooming in, allow more and more labels; during zooming out, remove labels of less important featuresSize of labels does not change!

  42. Labels on interactive maps

  43. Commercial packages • Maplex for ESRI’s ArcInfo and ArcGIS • Label-EZ/MapText for ArcInfo, ArcGIS, MapInfo, GeoMedia, … • EverName for MapInfo

  44. Maplex: Label fitting & conflicts • Label Fitting Strategies • Label Stacking • Font Reduction • Abbreviation • Conflict Resolution • Feature Priority • Overlapping • Creating background labels • Remove duplicate

  45. Maplex: Label position

  46. Maplex: Label position

  47. Maplex: Label position

  48. Maplex: Label fitting • Points

  49. Maplex: Label fitting • Lines

More Related