Jump to content

Rendering library for maps

From Meta, a Wikimedia project coordination wiki

Possible solutions:

Low-performance solutions:

  • Generating SVGs and converting them with RSVG
  • ImageMagick
  • Gimp

Probably wouldn't work (but if you think otherwise, please comment):

  • GD
  • Coding an own lib

Any other solutions ?

ImageMagick

[edit]

Used in current version, but a constant source of problems.

It has lot of bugs:

  • some bugs with rendering CJK with size smaller than 18. It may be FreeType-related.
  • Very bad polygon rendering bug
  • There was a bug with drawing semitransparent text, but fortunately it's fixed in newer version.

And its font-related features are rather limited.

Gimp

[edit]

It seems to have the features we need and it allows non-interactive usage. I have almost no experience with using it non-interactively and I don't know whether it's really practical.

Libart + Pango

[edit]

http://www.levien.com/libart/

It even lists "Rendering maps and other GIS (Geographic Information Systems) data, both for Web delivery and personal computer applications." as one of its applications.

http://www.pango.org/index.shtml

Seems more internationalized than anything one can get and reasonably high level. Works with libart.

Unfortunately libart also seems to have a rendering bug.

FreeType2

[edit]

They say their auto-hinter doesn't work with CJK and other non-Latin scripts. Very bad.

It's also way too low level to be used directly. It doesn't even do kerning.

RSVG

[edit]

One problem is that label placement algorithm needs to have font metrics. The possible solution would be to use RVSG for most of the work, and some font lib just to place the labels. It may lead to pretty complicated design.

Own lib

[edit]

It's very bad practice, would probably take huge amount of time and end without anything better than one of libs that are already available.

GD

[edit]

It lacks almost every single feature we want. Doesn't even handle semitransparency.

OpenGL + DevIL

[edit]

OpenGL can handle drawing relatively easily, while DevIL (formerly OpenIL) allows saving the screen [buffer] to disk as JPEG, PNG etc.

The mapnik toolkit is geared at creating high-quality antialiased maps from map data-formats such as SHP. Mapnik is the default renderer for the WikiMiniAtlas.