Friday, November 3, 2017

Labeling Islands (Part Three)

I ended the last posting with a map filled with islands, where the labeling was good but not perfect. Here's another example of a map filled with labeled islands:
This is pretty good.  The map has a lot of labels, and most of them are pretty long compared to the islands.  The algorithm has done a good job of keeping the center of the label near the island. There are a number of slight overlaps, but there aren't any really egregious mistakes.  However, it looks somewhat cluttered and chaotic.

One thing I can tweak is to encourage the labels to stay away from each other and the other islands. This should spread out the labels a bit and de-clutter some of the busiest areas, although there's only so much room for improvement on this map:
This layout is more nicely spread out and balanced.  This may be more obvious by comparing the two directly:
Another factor contributing to the "chaos" of the labels is the wide variety of angles to the labels. With only a few labels on a map, having them at many different angles isn't too distracting.  But with many labels it can be distracting.  I can tweak the map to try harder to make all the island labels horizontal:
This is a bit of a mixed bag.  Most of the labels are horizontal, but that has come at some sacrifice on the closeness of the labels.  Here's the before-after comparison:
To take this a step further, I can force all the labels to be flat and horizontal:
This forces many of the labels to cross the islands, go off-screen or have other problems.  However, it's not a terrible look.  If I want flat horizontal labels, I can also use area labels rather than path labels:
With this approach, the labels are more likely to be crossing the island, because they are tied to the area of the island rather than the path around the outside of the island.  Point labels can also be used to label island, by tying the label to a point at the centroid of the island:
This tries to make one corner of the label lie close to the centroid of the island.  I find this the least appealing of these alternatives.

Another possibility is to use multi-line labels.  Since island names always have at least two words, it's possible to present them as a block text rather than a single line.  Here is what multi-line labels tied to the island areas look like:
This certainly helps reduce the map clutter.  I can relax the criteria so the labels don't try so hard to be in the island area:
This leaves more of the land visible on the smaller islands.

Here's another example:
I include this mostly because I thought it looked pretty striking :-).

One problem with all these methods is that labels that look good on small islands don't look good on bigger islands.  So it might be interesting to look at an approach that uses different types of labels based upon the size of the island being labeled.  More on that at a future time.






1 comment:

  1. Regarding the chaos of island labels: Instead of forcing them all into a common orientation, maybe you could try to introduce a rule that penalizes larger differences in angles between island labels close to each other. This should reduce the chaos while still allowing for some leeway.

    ReplyDelete

Note: Only a member of this blog may post a comment.