开发者

Algorithm for placing labels for objects on a map

I'm looking for an algorithm that could determine the optimal location for placing labels next to objects on a map, at different zoom levels.

The labels should obviously:

  1. be as close as possible to开发者_如何学编程 their respective objects
  2. not overlap with each other
  3. have a reasonable font size in each zoom level

In e.g. Google Earth this is being done in a magnificent way.

Any pointers will be much appreciated, especially to pseudo-code of various approaches or, better yet, to actual code in Python, Javascript, or ActionScript.


Maybe the sliding labels approach, as discussed in this article, will be of help.

Or your could use a simulated annealing approach.

An approach inspired by ant colonies.

A genetic algorithm approach.

A Tabu Search approach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜