On Apr 2, 2011, at 9:34 PM, Colin Rundel wrote: > Hi everyone, >
Hi Colin. > I wanted express my interest in working on the ideas posted by Rob Coup > (Cascadenik: Native C++ implementation of node.js Carto and Cascadenik/Carto: > SLD Converter). Excellent. I think Rob is on the road right now, but feel free to shoot any further questions to the mailing list here and I or others will respond. > I was thinking that the two ideas could be combined into a more general > project that focuses on implementing a set of native C++ parsers (Carto and > Cascadenik) and generators (xml, Carto, Cascadenik, and SLD) for Mapnik. Yes, certainly the two ideas are closely linked. Currently we rely on boost::property_tree + libxml2 for the main serialization format for maps, but have been moving toward boost::spirit2 (as you note below). Seems like boost::spirit2 is well suited to a move towards json. Check out some interesting work at https://github.com/brycelelbach/prana. > This would allow Mapnik to be more flexible on the type of stylesheet it > natively accepts as well as allowing for translation between formats. > > After a little bit of research it seems like this is possible using Boost > Spirit which already appears to be used extensively in Mapnik (parsing: wkt, > svg, colors, etc). I've been playing around with Spirit for the last couple > days and I'm very impressed with how slick it is. Great. > I've written a simple json parser (http://github.com/rundel/carto-parser) to > handle carto mml files. Depending on the version it parses the json into an > AST and then outputs the original json via Spirit Karma or by printing values > as it traverses the AST. Cool, glad this is interesting to you. The real trick here is the CSS parsing - and the translation of that into meaningful mapnik objects internally. And the second challenge is to do it asynchronously, e.g so that various url-based resources can be downloaded in parallel while the stylesheet is compiled. > Parsing of Carto will obviously be much more complex but seems like a fun > project and a working Carto parser should be straightforward to modify to > handle Cascadenik stylesheets. Ya, the two projects are basically the same, just one in python (Cascadenik) and one in nodejs (Carto). Cascadenik benefits and is hampered by the quality and completeness of the python bindings, as recently we've move to compiling MML -> python objects directly. Carto leverages the Mapnik javascript bindings (node-mapnik) which are not nearly as developed as the python bindings, so it just compiles to XML then passes that to Mapnik. The beauty of core C++ CSS/MML/JSON functionality is that the hard bits (and the bits that need to be blazingly fast) could be leveraged from all bindings. > It also seems like it would be straightforward to implement generators using > Karma that would take a Map object and produce a desired format. Excellent. Our svg_renderer that Carlos started in last years GSOC also uses Karma generators. > > My relevant biographical information - I'm a fifth year graduate student in > Statistics at UCLA working on a dissertation in the area of spatial and > ecological statistics. In the last couple of years I've gotten interested in > accessible mapping/spatial visualization tools. Carto and Tilemill are some > of the most exciting developments I've seen in this area. I successfully > participated in the GSoC last summer through the R Project where I worked on > the rgeos package, an R wrapper for the geos library. The package and its > source is available from CRAN > (http://cran.r-project.org/web/packages/rgeos/index.html). In the longer term > I would love to create R bindings for Mapnik since R's current spatial > visualization options are somewhat limited. Nice! > > Any comments or feedback would be greatly appreciated, I'm working on a more > detailed proposal that will hopefully be up on the GSoC site in the next day > or so. I will post a link as soon as it is ready. Awesome, let us know how we can help! Dane > > -Colin > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

