Mapnik 3.0.12 Release Sep 08, 2016 | Artem Pavlenko
Mapnik 3.0.10 Release Feb 29, 2016 | Artem Pavlenko
Node Mapnik 3.5.0 Release Feb 29, 2016 | Sam Matthews
Mapnik 3.0.9 Release Nov 26, 2015 | Artem Pavlenko
Mapnik 3.0.7 and 3.0.8 Releases Oct 26, 2015 | Artem Pavlenko
Mapnik 3.0.6 Release Oct 08, 2015 | Artem Pavlenko
Mapnik 3.0.5 Release Sep 17, 2015 | Artem Pavlenko
Mapnik 3.0.4 Release Aug 26, 2015 | Artem Pavlenko
Introducing a Color Blind Filter Aug 14, 2015 | Blake Thompson
Mapnik 3.0.3 Release Aug 12, 2015 | Artem Pavlenko
Mapnik 3.0.2 Release Jul 31, 2015 | Blake Thompson
Node Mapnik 3.4.1 Release Jul 31, 2015 | Blake Thompson

latest news

Mapnik, GSoC, and Stylesheets

May 24, 2011

BY: Colin Rundel   Colin Rundel

Since yesterday was the official start date of the Google Summer of Code 2011, Dane asked me to post a little about my project and what I hope to accomplish over the next several months.

My project is focused on bringing native parsers for the Carto and Cascadenik map stylesheets into the core Mapnik library with fast implementations in C++. Currently parsers for these stylesheet formats are only available in javascript and python respectively which is somewhat restrictive for many of Mapnik's use cases. A core implementation of these specifications will make these stylesheet formats available to the widest possible audience of Mapnik users and will keep the styling specifications closely tied to internal Mapnik styling implementation which will hopefully improve performance and maintainability in the long run.

The first stage of this project, and what I have started work on, is the implementation of a parser for Carto which takes a Carto stylesheet and generates an abstract syntax tree from it. This is being done using Boost Spirit which is a beautiful set of C++ libraries for parsing and output generation of domain specific embedded languages. This initial work will not be immediately useful for mapping as it is still necessary to translate the AST to Mapnik's internal map representation but it is an important first step in the parsing processes. You can follow progress on this work on my github page and my GSoC branch on the Mapnik SVN.

The github page also contains some initial work on a Carto generator which reads in an XML style file and translates into a Carto stylesheet. At this point the output is (nearly) valid Carto syntax and while it does not use many of the more advanced features of Carto (nested styles, mixins, functions, etc.) it should give a good sense of what the Carto equivalent of a XML style file should look like. This software depends on Mapnik2 with changes that are currently only present in my GSoC branch and Boost 1.47 (svn trunk) if you are interested in trying it out.

Copyright © 2016 Artem Pavlenko | Downloads | License | Media