{"comment":{"created_at":"2011-10-11T16:11:19Z","body":"[cdestigter] We've been looking at implementing this. I'm fairly new to the mapnik codebase, but after a bit of poking here's a plan:\r\n\r\n 1. Read SVG symbols:\r\n   * SVG parsing using Gnome's [http://librsvg.sourceforge.net/ librsvg]\r\n 2. Image rendering abstraction to get away from ImageData32 (the current \"symbol\" data class):\r\n   * Something like an AbstractImage class, wrapping width, height and rendering functions (ImageData32 and VectorImage can derive from this)\r\n   * Make calls to point_symbolizer.get_image() return an AbstractImage (i.e. a VectorImage for SVG symbolizers, and a ImageData32 for raster symbolizers) \r\n 3. Actually render the vector data:\r\n   * Overload Mapnik's cairo_context::add_image() for VectorImage to render the abstracted image as a cairo surface instead of raster data. librsvg can already draw into a cairo surface.\r\n   * Initially make the AGG renderer rely on Cairo for SVG rendering. If someone really wants to make this cleaner they could extend librsvg to render to AGG. That looks like too much work for little gain at the moment. So, we could:\r\n      * Render a surface using Cairo\r\n      * Rasterize surface and pass it back to AGG as an ImageData32 \r\n\r\n\r\nThis means:\r\n\r\n * SVG symbol support would depend on both librsvg and cairo\r\n * It'd be a backwards-compatible extension of the existing way to use images, by adding support for type=SVG in addition to existing PNG support.\r\n * It'll apply to both point and shield symbolizers\r\n\r\nAny feedback before I start writing code?","updated_at":"2011-10-11T16:11:19Z","url":"https://api.github.com/repos/artemp/mapnik/issues/comments/2366235","id":2366235,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":320,"created_at":"2011-10-11T16:11:19Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"It would be very nice to allow for arbitrary SVG shields as symbolizers on areas, points, and lines.\r\n\r\nThis would allow (e.g.) US Interstate highway shields and other similar features.\r\n\r\nSee also: https://lists.berlios.de/pipermail/mapnik-users/2009-April/001809.html","comments":1,"title":"SVG-Based Symbolizers","updated_at":"2011-10-11T16:11:19Z","url":"https://api.github.com/repos/artemp/mapnik/issues/320","id":1877466,"assignee":null,"milestone":{"number":13,"created_at":"2011-10-11T15:50:48Z","due_on":"1970-01-01T09:21:56Z","title":"Mapnik 2.0","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/mapnik/milestones/13","open_issues":1,"closed_issues":34,"description":"Upcoming Mapnik 2 release (first in series)\r\n\r\nMajor new features:\r\n\r\n  * Expressions support ( dynamic/data-driven symbolizers - #359, #70,#352)\r\n  * SVG Symbol support, including Gradients\r\n  * \"!MetaWriters\": Support for outputting GeoJSON of rendered features (see: MetaWriter)\r\n  * Python3 support (wiki:Python3k)\r\n  * Better raster scaling methods like lanczos, cubic, and higher quality bilinear (#656)\r\n  * New RasterColorizer for color ramping data rasters\r\n  * Support for \"interior\" placement of points and labels (aka point_on_surface) #709\r\n  * Performance improvements under high concurrent load (avoidance of proj4 locking)\r\n  * Addition of a 'mapnik-config' program to query mapnik settings\r\n  * Support for XInclude in stylesheets: #567 ([http://trac.mapnik.org/browser/trunk/tests/data/good_maps/xinclude examples])\r\n  * New plugins: Rasterlite, GEOS, templates/hello_world\r\n  * NUmerous improvements to alpha blending in raster support\r\n  * New usage of boost::spirit 2 for parsing (colors, filters, expressions)\r\n    * This means much 'slower' compiles but faster runtime code\r\n  * Addition of Jpeg reader for reading jpeg symbols and jpeg datasources (in raster.input)\r\n  * Advanced MarkersSymbolizer drawing options\r\n  * memory_datasource support in python (dynamic creation of features)\r\n  * Support for the clang++ compiler\r\n  * Fractional text halos using Freetype2 Stroker\r\n  * Ability to align pattern fills globally (#203)\r\n  * Vastly improved builds on Open Solaris\r\n  * Support for .dbf files over 2GB (#595)\r\n  * Support for triggering line breaks with '\\n' character (#584)\r\n  * Symbols are lazily cached instead of being read from filesystem many times\r\n  * Features are cached when used in more than one style consecutively (optional feature)\r\n  * Added ability to pass scale factor to renderer to scale symbols, fonts, line widths\r\n  * OGCServer removed from source tree, now at https://github.com/mapnik/OGCServer with many bugfixes: \r\n  * WKT parser\r\n\r\nFollowing features will be addressed in subsequent releases:\r\n \r\n  * Polygon hatch fills (#642)\r\n  * Map orientation\r\n  ","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/mapnik/issues/320","labels":[{"name":"Symbolizers","url":"https://api.github.com/repos/artemp/mapnik/labels/Symbolizers","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1877466,"comment_id":2366235}}