Mapnik Code Sprint 2012 - Day 1 Recap
Yesterday was the first day of the June 2012, Washington DC Mapnik code sprint.
We kicked off the morning with a remote skype call and IRC sharing session with community members around the world.
It was an enjoyable and spirited time sharing ideas for new features and connecting on the details of recent stuff that has landed and needs documented. The remote group included Steve Chilton, Darafei “Komяpa” Praliaskouski, Nikolai Lebedev, Mickey Rose, Michal Migurski, Bill Morris, and Konstantin Käfer. In we had DC Artem Pavlenko, Lars Ahlzen, Serge Wroclawski, AJ Ashton, Tom MacWright, and Will White, and Dane Springmeyer.
Topics that received strong attention in the discussion were supporting better text and marker placement, more data-driven/dynamic symbolizers, and CSS natively. Fortunately each of these tasks, while very large, are in process and solidly on the roadmap.
Mapnik 2.1 will include a re-written placement system by Hermann Kraus, supporting alternative placements and fallbacks – the task before release is to document how it works.
A big step forward to more dynamic symbolizers was achieved last week thanks to the team at mirecta/mapy.cz who landed expressions support for svg transforms, and markers sizes will also soon be able to be data-driven. But, much work and energy remains to properly design and support more symbolizers – work that will likely take another 6 months or so and will not appear until after the Mapnik 2.1 release.
Native CSS support awaits free time from developers to pick up on the excellent work by Colin Rundel during Google Summer of Code 2011, but this should be feasible within the next year.
In the afternoon everyone split off to experiment with new ideas and play with new features.
Lars started upgrading TopOSM to the latest Mapnik 2.1.0-pre code, which natively supports compositing operations between features and styles. Lars hopes by leveraging compositing natively in Mapnik he can radically speed up his existing rendering workflow. Along the way he found a few bugs in SVG parsing that I was able to fix promptly and he discovered some interesting design issues around “Smart Halos”, that will help guide the refinement of this experimental feature.
It was a joy to see the real-time collaboration with remote participants, as Bill Morris commented on the subtleties of TopOSM rendering vs. google’s terrain, and better approaches were discussed on IRC.
Tom and Artem spent most of the day brainstorming and experimenting with HSL (hue, saturation, and lightness) color transformations in Mapnik. HSL rotation could perhaps be a new kind of blend mode or standalone symbolizer – imagine being able to rotate hue in your entire map (or by feature) like:
AJ started messing with new bezier smoothing features that Artem added to Mapnik as part of his push on Compositing in core. The goal was the properly document the feature in Mapnik’s styling reference, but in testing AJ found the unintended uses of beziers (when they double back on themselves) can be gorgeous and give maps an hand drawn look:
Or a trippy look:
I enjoyed acting upon a few side project ideas. After getting Mapnik compiled and built against the iPhone Simulator SDK on OS X, I wrote a simple Objective C++ app to be able to stress-test Mapnik rendering. See a video here. I also started experimenting with wrapping Mapnik in a pure and simple C API. The motivation here is that a C API could provide a more stable endpoint for apps using Mapnik, could make things like PyPy python bindings support (through ctypes, or node-ffi) easy, and would allow ObjC iOS applications to call into Mapnik directly from C without needing to compile as ObjC++. It was great that just uttering my interest in this topic prompted some sage advise from Howard Butler about important design considerations for theadsafe concurrency in C API’s.