Overview of Total Work Done

  1. Brushing of C++
  1. Compiled the MapServer code on Linux and Windows from source.
  1. Explored the MapServer functionality and codebase through the documentation.
  1. Read up about SVG syntax, parsing and rendering.
  1. Researched on various non-intrusive open source graphics libraries that support SVG (Libsvg-cairo, cairo, Librsvg and AGG(Anti-Grain Geometry)). The research involved finding the dependencies, functionalities, integratability and ease of use of each library. AGG was decided for in the end as it had already been integrated into the MapServer codebase in the past. Libsvg-cairo, cairo and Librsvg were pushed aside due to their large number of dependencies and for the added task of having to integrate them into the MapServer codebase unlike AGG.
  1. Understood, modified and added the SVG parser example from the AGG codebase into the MapServer codebase. The modifications included changing the namespaces from agg:: to mapserver::. The research included finding the subset of the SVG specification that was supported by the AGG SVG Parser example. It also included understanding the various functionaities provided by the parser and renderer. The modified code is stored at a project specific sandbox that can be viewed here
  1. Wrote an RFC on the entire process of adding SVG symbol support to MapServer. The SVG details the various design decisions that were taken. The RFC can be accessed here.
  1. Started working on getting SVG rendering support into MapServer. This was done through the following steps:
  • Modified the MapServer lexical analyzer (in maplexer.l) and added the required new keywords ('SVG' for the new type and 'SVGPATH' for the path to the SVG image).
  • Modified the MapServer mapfile parser (in mapsymbol.c and mapsymbol.h) and added parsing support for identifying and getting information about the SVG type.
  • Created a new bridge file (mapsymbolsvg.cpp and mapsymbolsvg.h) to integrate the SVG parser and the MapServer C code. Began the function createBrushFromSVG's implementation in the new file. This function returns a gdImagePtr (for now, we concentrate on rendering with the GD renderer) from the specified SVG file by first rendering it to an AGG pixmap and then converting it to a GD pixmap.
  • Modified the various rendering functions in mapgd.c to use the new createBrushFromSVG function when a SVG symbol is found in the symbolset. Currently createBrushFromSVG is still not fully implemented and tested.

Work to Do Next Week

Although the official pencils down date is 17th, August, I will continue to do the following in the next week to complete the project successfully.

  1. I will be working on completely implementing and testing the createBrushFromSVG function and any remaining glue code.
  1. Currently all the work involves getting SVG symbols to render with the GD renderer. Once that is completed, I will move onto getting it to render with the AGG renderer.
  1. Any currently unforseen changes to the RFC will be made and some of the remaining documentation will be prepared (eg. the subset of the SVG specification supported by MapServer).

The Experience

Working with MapServer over the summer has been an amazing experience for me. I got to know some wonderful people in the process and, being my first foray into the world of open source development, taught me a lot about how things go on under the hood! I also learned a lot from my mentor (Daniel Morissette), who has been extremely supportive and encouraging right from the beginning. I am also extremely thankful to the other developers on the mailing list and IRC channel who helped me out in many corners constantly. I would love to continue to work along with this community in the near future and take up further MapServer projects.

Last modified 15 years ago Last modified on Aug 16, 2009, 5:18:15 AM
Note: See TracWiki for help on using the wiki.