Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

acme
  (email not shown publicly)
http://www.astray.com/

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Saturday July 14, 2001
05:10 AM

Image::WorldMap

[ #421 ]
I finally did it. After at least six months of promising Elaine I'd do it, I've released Image::WorldMap to CPAN. It helps create graphical world maps of data, such as the Perl Monger World Map. All you have to do is give it a list of locations (longitude, latitude) and a label, and it does the rest.

The image drawing part wasn't the hard part. The hard part was figuring out a scheme to make sure that labels don't overlap. This is a problem for things like the PM world map, as groups tend to be clustered together (such as in the UK, or the east coast of the USA).

It's a hard problem mathematically, but I did my research and eventually ended up with an Inline::C solution using a simulated annealing method.

It comes with example scripts which draw maps for Perl Mongers, CPAN Mirrors and Debian developers, so check out the code and let's get some more geographical maps out there!

Yes, I'm a sucker for pretty pictures...