Sunday, November 8, 2015

Manual Key-Numbering for Concentrated Map Labeling

I'm working on a map book with a hand full of feature layers across multiple pages. Each page in the map book is displayed at individual scales, so some pages are significantly wider than others; which means that the scale at which annotation is drawn (reference scale) is important to consider.

As an example, I set up some geotagged photo locations from around town:


Pages 3 and 4 aren't too dense, so automatic labeling is acceptable:

Page 1 is another story. Some of the points are too close together to use full labels:


Key numbering would be great for this page since there are areas where double digit numbers could easily be placed, but longer titles would not fit. The user will refer to a lookup table to match the label number with descriptive information. Furthermore, key numbering results in a visually cleaner look. Here's the finalized example:



In other projects I have multiple labeling schemes active (and I have read that multiple instances of key-numbering is a nightmare) so I came up with a workflow to manually create some key-numbering for your ArcMap project with a little sorting in Excel.

Workflow


  • From the properties menu, Export your point layer's attribute table and open it in Excel/Open Office Calc/Google Sheets/etc.
    • Ensure that the Object ID field exports correctly - we will need this in a later step
    • If the Object ID field does not export properly (see below), you may need to add a new field (type = short integer) named ObjectIDs or something similar, and calculate the OBJECTID field values into this new field before your export
The OID field didn't export correctly from ArcMap. 
Object IDs were calculated into a new field (Column D)before exporting from ArcMap
  • Sort your latitude field descending (largest [northernmost] values on top, smallest [southern] values at the end)

  • Add a new field named KeyLabel to record the order of your latitude values and save them as your key-numbering value
  • Calculate =Row()-1 for each record in the dataset (data beginning on row two will have a value of 1. This will be your key numbering label. Optionally, copy these cells and paste in the same place as values to get rid of the formula and preserve the value only
  • Save the spreadsheet, or export it in a format that ArcMap can read (.xls/.txt/etc.). Add it to ArcMap and it will be visible as a standalone table
  • Right click on your point layer and choose Joins and Relates > Join

  • Point to the table we just added, and choose to join based on the OBJECTID field from the layer as well as the table we're joining data from
  • Check the Attribute Table to ensure that the join was successful

  • Right click on your point layer and choose Properties
  • Navigate to the Label tab
  • Enable Labeling, and choose KeyLabel as the Label Field
  • You may need to play around with Placement Properties a bit to get the labels to draw in the best position for your dataset. When necessary, convert your labels to annotation to manually adjust their position

  • Finally, Go back to the spreadsheet and grab the values from the KeyLabel field as well as your point's name field. There are a few ways to display tables in ArcMap as a lookup for your key-numbering in your map. I simply pasted groups of data to text elements below, but you can also add data directly from a spreadsheet, etc.

No comments: