Skip to content

Commit

Permalink
initial stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
nvkelso committed Mar 22, 2012
1 parent 08c1baa commit d107237
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**Map Label Style Manual**

NAMES

When we cannot fit the full, formal name of feature we can often label a shorter version.

For example: "USA" is an abbreviation of "United States of America".

For over 3,000 abbreviations for general map features and roads specifically:

* abbreviations/abbreviations.ods

PLACEMENTS

Once we have a collection of long label and shorter fallback label, we need to actually try placing them on the map.

* geometry_type/linear_feature_label_rules.md
* geometry_type/point_feature_label_rules.md
* geometry_type/area_feature_label_rules.md
* geometry_type/page_layout.md

TYPE STYLES

Use more than one font face, style, and size:

* Tk tk tk

**Related software projects:**

* [Dymo](https://github.com/migurski/Dymo) - Map point label placer with simulated annealing.
* [Skeletron](https://github.com/migurski/Skeletron) - Generalizes collections of lines. Useful for 2x carriageway roads (like divided highways or boulevards).
* [Mapnik 2.0](http://mapnik.org/news/2011/07/13/new_text_placement_system/) -

**Further reading:**

* [National Geographic Style Manual](http://stylemanual.ngs.org/home/F/foreign-terms) - Type styles, translation of common terms, proper nouns, titles, plurals, phrases, and diacritical marks. Also see [NG Abbreviations](http://stylemanual.ngs.org/home/A/abbreviation).

* [Webster's Geographical Dictionary](http://www.merriam-webster.com/cgi-bin/book.pl?geog.htm&9) - Convenient alphabetical listing of more than 54,000 entries
Binary file added abbreviations/abbreviations.ods
Binary file not shown.
73 changes: 73 additions & 0 deletions rules/area_feature_label_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
For multipart features:

**What, where:**

* If a single label per feature part, then that label should be near the centroid for the largest part.
* If auto: also label extra parts that are above a certain size per the scale (zoom) of the map. (Can the label fit.)
* If every part: each part's label should be near it's centroid.

**Big features:**

(measured in terms of page units)

* Add letter space to "spread" the type to match the size of the feature.

**Types of Features with Indeterminate Boundaries**
Named Marine Water Bodies - Hydrography - Must Nest, No OverlapsNamed Physiographic Features - Physiography - May Nest or Have Partial OverlapsNamed Islands and Island Chains and Groups - Physiography and Hydrography - Must Nest, No OverlapsNeighborhoods and Districts, Vernacular Regions - Cultural and Transportation - May Nest or Have Partial OverlapsLand Cover, Geology, Soils and Other Overlays - Overlays - No Overlaps

**Feature Geometry Types**

A set of seven feature types that are used to specify label classes and variations in label placement properties were developed.
1. Long
2. Long and Skinny
3. Oblong
4. Round5. Snaky or Pronged
6. Splotch
7. Snaky or Pronged and Skinny

**Calculating feature geometry types:**

In order to create the information that is stored in these fields, a Python script was written and uses an ArcGIS 9.2 geoprocessing command called ÒGEOM- ETRY:HULLRECTANGLEÓ. This command returns a string containing the eight coordinates of the MBR. With these coordinates the RatioL2W and MBRArea field values can be set. The values for the LabelType field are set based on the following pseudo-code logic:
If RatioL2W < 4 and MBRArea > 60% Label Type = ÒRoundishÓElseif RatioL2W < 8 and MBRArea > 25% LabelType = ÒOblongÓElseif RatioL2W >= 8 and MBRArea > 10% LabelType = ÒLongÓElseif RatioL2W >= 8 and MBRArea <= 10% LabelType = ÒLong and SkinnyÓElse
If RatioL2W < 4 and MBRArea >= 20% Label type = ÒSplotchÓ
Elseif RatioL2W < 8 and MBRArea > 12% Label Type = ÒSnaky or ProngedÓ
Elseif RatioL2W < 8 and MBRArea <=12% Label Type = ÒSnaky or Pronged and SkinnyÓ

This logic is essentially first determining whether the shape is round-ish, and if not, if it is oblong or long, and if not, if it is a splotch, or snaky or pronged. The specific thresholds may need to be tuned to spe- cific cartographic requirements.

**Label placement per feature type:**

Round-ishi. Placement: Curvedii. May overrun by 36 pts iii. Allow asymmetric overrun = trueiv. Char. Space = up to 200% v. Reduce font from 14 pts. to 10 pts. by 1 pt. increments
Oblong
i. Placement: Curved
ii. May overrun by 12 pts
iii.Char. Space = up to 300%

Longi. Placement: Curved
ii. Try Horizontal First = true
iii. May Stack = true
iv. Character Spacing = up to 200%

Long and Skinnyi. Placement: Boundary
ii. May Place Outside = true
iii. Offset = 4 pts
iv. Char. Space = up to 240%
v. Background Label = true

Splotchi. Placement: Curved
ii. Char. Space = up to 300%
iii.Reduce Font from 14 pts. to 10 pts. by 1 pt. increments
Snaky or Prongedi. Placement: Curved
ii. May overrun by 12 pts
iii. Char. Space = up to 400%

Snaky or Pronged and Skinny
i. Placement: Boundaryii. May Place Outside = true
iii. Offset = 4 ptsiv. Char. Space = up to 240%
v. Background Label = true

**Sources and further reading:**

* [A Multi-scale, Multipurpose GIS Data Model to Add Named Features of the Natural Landscape to Maps](http://nacis.org/documents_upload/cp55fall2006.pdf) - Cartographic Perspectives Number 55, Fall 2006. Aileen Buckley [email protected]Charlie Frye [email protected] Cartographic Research and Special Projects Group Environmental Systems Research Institute, Inc. Redlands, CA

* [Shape Types for Labeling Natural Polygon Features with Maplex](http://nacis.org/documents_upload/cp54spring2006.pdf) - Cartographic Perspectives Number 54, Spring 2006. Charlie Frye Environmental Systems Research Institute, Inc. [email protected]
Expand Down
19 changes: 19 additions & 0 deletions rules/general_layout_and_balance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**Text orientation**

For 1:50,000,001 and smaller (global)

Page baseline for point and area text. Line labels hug their lines.

For 1:250,001 to 1:50,000,000 (continent)

Page baseline for point and area text. Line labels hug their lines.
or
The graticule for point and area text. Line labels hug their lines.

For 1:250,000 and larger (city)

Page baseline for point and area text. Line labels hug their lines.

**Balance**

Don't draw text upside down.
91 changes: 91 additions & 0 deletions rules/linear_feature_label_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Use the generalized roads to help with the angle and curve issues.
Give them a uniqueID when they've been dissolved and then cutup.

Automated Text Placement
Significantly Improve Your Success with These Steps

Hans van der Maarel - Red Geographics

[email protected]
twitter: @redgeographics

Methods
1.Classification
2.Abbreviate names
3.Filter street name length vs street length
4.Filter street name length vs street crookedness

Classification
•Should already be present in source data
•More important features get higher priority, different font etc.

Examples:

Broadway > B’way
Fifth Avenue > 5th Av.
Martin Luther King Jr. Way > M.L.K Way

Burgemeester Jonkheer Quarles van Uffordlaan > Burg.Jhr.Quarl. v Uffrdln.
Jonkheer Meester G.W. Molleruslaan > Jhr.Mr.GW Moll.ln.
Laan van de Mensenrechten > Ln. v/d Mensenr.

Warning:

Beware of “pre-abbreviated” data

Street name length vs street length
•Calculate whether street is long enough for label
•If not, use condensed font and/or more strict rules
•2 or 3 levels

The Formula

( number of characters ) / ( street length / average letter width )

If < 1 street is long enough for label
If > 1 label is too long for street

Crookedness

•Calculate circularity of convex hull? (lower = better)
•Calculate point/length ratio? (higher = better)
•Calculate angularity? (lower = better)

Crookedness, part 2
•Stricter placement rules
•Different font
•Label on a generalized line

Further work / Improvements:

•Letter-width lookup table
•Seamlessly combine all these methods
•Find a way to measure good text placement
•Extend to point and area features

Solutions:

Create more layers!
•Pre-processing GIS data
•Force software to act human

http://kelsocartography.com/presentations/2011/pcd_2011/hans_van_der_Maarel_Improve_text_placement_results_NACIS2011.pdf

Exclusion list:

Roads like "The Avenue", "The Green" etc should not normally be abbreviated.

Further reading:

* [Contour lines](http://www.cartotalk.com/lofiversion/index.php?t1499.html) - Charlie Frye in CartoTalk

1. Too many labels are a bad characteristic as the information on the map is covered up.
2. Contour labels should either be oriented uphill or oriented to the page. If the former method is used, then it is generally considered a kindness to map readers to place more labels on the south facing slopes as these will be right side up for reading.
3. The labels should be on a straight base line; curves cause the numbers to be oriented in a fashion that can be difficult to read.
4. Contour labels should be along fairly straight sections of a contour line. This because the label will blank out a portion of the line and the map reader is left to infer the location of the contour line; a straight line is much easier and more likely to be inferred correctly.
5. Do not add extra ink, as it will impede viewing of relevant geographic representations. Extra ink includes such as thousands separators, for example use 1850, not 1,850; and unit of measurement abbreviations, which should be provided as part of the map?s legend.
6. [Visually] break the contour lines around and behind the label. A 0.5 point (1/144 inch) gap around the contour label is usually sufficient. This is because the contour label is ideally in the same color as the contour line. [This can be accomplished with a text halo]
7. Index contour labels are most needed near the tops of ridges, bottoms of valleys, and along dramatic changes in slope.
8. Avoid placing labels on the portions of contour lines that trend north to south.
9. Do not ladder or stagger labels to form any sort of obvious pattern. The key word is obvious; as subtle patterns will actually help map readers in finding additional contour labels quickly. Obvious patterns will jump out at map readers, not only distracting them, but also creating false patterns in the landscape.
10. Among other items from the USGS: good judgement on the part of the cartographer and editor.
1 change: 1 addition & 0 deletions rules/point_feature_label_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Imholf, yo

0 comments on commit d107237

Please sign in to comment.