Saturday, November 11, 2017

Labeling the Coast (Part Four)

In the last posting, I wrapped up (at least for now) creating "Lost Coast" type labels, as shown on this map:
I'm now going to use the same approach for labeling other map features.

Around a year ago, I posted about the approach Dragons Abound uses to create peninsula island ranges.  The basic idea is to detect a peninsula on the map and then project some islands out from the end of the peninsula.  That seems like an ideal feature for a map label.  Now that I have path labels working, to label a peninsula I just have to create a path label down the middle of the peninsula and attach the label to it:
Two island ranges have been added to the map -- one in the middle left "Stinshem Point" and the other in the bottom right corner "Snin Point".  I've created simple names for them and added those labels to the map.  (Creating the island ranges consumes a number of random numbers, changing everything that happens afterwards - which is why this map has a different climate and font choice.)

It's worth noting here that since the path runs down the middle of the peninsula it doesn't really have a water side and a land side.  So unlike the "Lost Coast" labels, I'm not forcing this to be in the ocean area of the map, so sometimes it isn't:
At the moment I think that's okay, but it's not hard to place the label into the water by forcing it to be offset from the path:
One minor problem with using a path projected out from the middle of the peninsula is that the islands are added somewhat randomly, and their positions are perturbed so that I don't always get a boring straight line of identical islands.  But because of this, the projected path of the islands might be different than the actual path.  It's a fairly small area at any rate, but just to be sure, I can keep track as the islands are generated and placed and use that information to create a more accurate path for the islands.

1 comment:

  1. I see you have been putting in a lot of work into this and it really shows, at least from the screen grabs, but will you ever be releasing the code or a stand alone app?

    ReplyDelete

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