11/05/2012

Classifying & Labeling!

As I mentioned in the last post, much of what is going on right now is adding more information and context to the maps. With this information I can label the different entities on the map. I just started doing that, and although there are some challenges to overcome still, it looks like it can work satisfactory. I've taken continents, oceans, lakes, and islands so far, and given them "names". (It's all dummy-data so far, but that's beside the point at this stage). Finding the location to put the labels is not necessarily as trivial as one would expect though. Finding the "middle" of any kind of shape is not difficult in itself, but most algorithms are very time-consuming when working on such large amounts of cells. So I ended up scaling the algorithm itself, offering higher precision for smaller entities, and lower precision for the larger ones (like large oceans).

Challenges include labels that overlap each other. For instance, cities might be located on small islands, and then the label for the city name will crash with the label for the island name. These are things I'm going solve going forward. Also, all the labels are pretty plain and horizontal at the moment. When I start to label rivers for instance, the label could/should curve, and be angled adjacent to the river angle. Again, things that will be solved eventually.

Labels and identification of map entities might seem like a small thing when looking at the map below. But for the underlying system it's huge, and opens all kinds of doors. So, yay!

Islands & Lakes!


No comments:

Post a Comment