Mapnik 3.0.22 Release Jan 22, 2019 | Artem Pavlenko
Mapnik 3.0.21 Release Oct 08, 2018 | Artem Pavlenko
Mapnik 3.0.20 Release Apr 12, 2018 | Artem Pavlenko
Mapnik 3.0.19 Release Mar 06, 2018 | Artem Pavlenko
Mapnik 3.0.18 Release Jan 26, 2018 | Artem Pavlenko
Mapnik 3.0.16 Release Nov 16, 2017 | Artem Pavlenko
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

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 © 2018 Artem Pavlenko | Downloads | License | Media