I've been playing this evening with making a version of Weathermap that can draw maps using the Cairo graphics library, instead of GD, which it presently uses.
Cairo is the library that the next version of rrdtool uses, along with other large projects. It offers some interesting features like proper alpha handling/anti-aliasing and more output options (PDF, postscript, as well as the usual PNG etc).
Here's a side-by-side comparison of GD and Cairo on the same map - my "0.96 testing" map. I didn't actually rewrite Weathermap to do this - I just made it write out the coordinates as it drew things, and wrote a perl script to read those and use Cairo to draw them again. That means not everything is in the Cairo image, but there's enough to see the differences.
Here's the complete GD image, and here's the Cairo one. The anti-aliasing is the most obvious difference, on the curves and curve outlines.
Only downside is that there aren't really any good php bindings for Cairo yet.
The GD map shows a few new 0.96 features too, including pie and nink artificial icons, and z-ordering (half the double link goes below the big box, and half goes above - same for the items around the legend).
GD vs Cairo
June 3, 2008 - 9:24pm
July 9, 2008 - 5:23pm
d00d. try SVG. isn't that one a no-brainer?
July 12, 2008 - 9:32am
Not if you use IE.
I will probably take a look though. I'm pretty sure that one of Cairo's output formats is SVG, so in fact that comes 'for free' with Cairo.
July 3, 2008 - 6:22am
You may use GraphViz lib (DOT language) to produce maps. It is a very interesting and powerful tool. In the other hand GraphViz has a very complicated installation due to support anti-aliasing from Cairo.
June 13, 2008 - 6:38am
The page isn't quite the same.. there are big differences between the pictures.
[i mean that they are not identical in arrangement and position of some items]
Do i need an plugin in my browser to veiw the new png image?
I'll post the 2 pictures on my website to see the differences.
http://marius.catrangiu.ro/cairo-view.jpg
http://marius.catrangiu.ro/gd-view.jpg
If you really drown them like this... then it's ok :)
June 13, 2008 - 1:39pm
I know there are parts missing :) I only spent a couple of hours to get a rough idea - I didn't convert everything.
I was mainly interested in the anti-aliasing (GD doesn't anti-alias lines or polygons), and better font rendering (GD's small font handling isn't so great).