Symbola

July 13, 2012 • #

If you’ve ever done much involving symbol sets in mapping (especially web mapping), you know about the nightmare of managing 700 separate PNG files, with different, duplicate versions for slightly different size variations and colors. Even with a small set of a dozen symbols, if you want 3 sizes and 5 colors for each, you’re looking at 180 distinct PNG marker symbols to keep track of. Ugh. SVG format simplifies this in certain ways, but isn’t as universally supported or easy to work with as simple GIFs or PNGs.

With TileMill, I’ve wanted to use marker symbolizers frequently in maps, but I often avoid it because it involves a bit of tweaking and configuration to get all the files in the right place, build out all the styles marker-by-marker, and changing colors isn’t that easy.

Symbola

To address this issue and make it easier to get dynamic markers on your maps, Zac built Symbola, an icon font constructed by embedding SVG graphics into TTF and OTF files. It uses the open source FontForge library and a python script to grab the set of SVG graphics, convert them to glyphs, and assigns them to unicode characters. There is a process involved to get the unicode data attributes into your data, but if you use PostGIS as much as I do, this is well worth doing. There are instructions in the README on how to insert specific characters into your PostGIS data tables using SQL. It’s a clever way to manage symbology at the database level, rather than creating duplication all over your style files with hundreds of iconography-specific style definitions. Check it out on GitHub, you can even customize it and add your own markers.

Topics:   open source   cartography