Gsoc 2011 proposal - Implement KML-SVG translation
Hi,
I am applying to Gsoc 2011. I have submitted the proposal on line at: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/ywxiong/1...
The proposal is pasted below too. Would you kindly share any comments? I look forward to talking with the mentors of this project. Thank you.
*Proposal:*
*Implement KML SVG translation*
Both SVG and KML are XML format data which can be used to present marks/paths/polygons/images on map shaped display. They have so many elements in common. SVG format is used on INKSCAPE but KML can be displayed on Google earth. It would be nice to have a tool to convert the two types of data files. Hence it can increase the popularity and generality of INKSCAPE.
Since both of them are XML, the best way to transfer the two types of files is to utilize the xsltproc command within the libxslt library. This command reads and converts a defined XSLT transformation template to the desired XML format. The libxslt library has already been implemented and widely used in inkscape. Hence the task in this project is to implement the transformation template of XSLT file.
However, there are a few things which need to be brought to our attention before getting started on the XSLT transformation template.
1. Both KML and SVG data can be compressed for saving space. To deal with compressed files, there is an existing library “zlib” in inkscape. It can be used to compress/decompress files to generate a proper format.
2. SVG data displays in 2 dimensions while KML is 3D. SVG data contains graphic effects such as filter, and animation, which is difficult to be represented in KML files. This means only partial information of the source file can be converted to the result file, such as points, images, polygons and lines, etc.
3. The speed of the xsltproc command is relatively slow when processing large data files. If possible, we need to implement some pre-processing logic to the conversion tool to improve performance.
*Background and skills*
*1. *Development experiences of GPS product for sail boats.
This project was done in C++/MFC in windows and embedded c on a pre-designed portable device. The software on Windows could load KML files which contain the sailing waypoints info and it calculates the best sailing routes based on the waypoint info. The software could also send the KML waypoint info to the device via Bluetooth. This project involves the KML parsing, writing and processing.
So, I have strong skills in XML and KML.
I have done similar KML parsing in C/C++ before.
I used Gzip for unzipping binary KML.
This project seems relevant and achievable with my skills and experiences.
*2. *Game development
I worked as Software Engineer with a local company that is a leading game studio (Top 50 in the world) for over 2 years.
They are very large games (e.g. NBA 09 Wii, FIFA 10) uses very similar architecture design with Inkscape. It uses C++ and makefile.
After browsing Inscape source code, I found similar points to my experiences:
- C++
Many years experience.
- CMakeLists
Research on digital image processing, using open source libs ITK and VTK which are using CMake and CMakeList.
- XML GUI approach
Experience from work. The internal build tools I used is a wxWidget application which loads the pre-defined XML format gui data.
- Wxwidgets
- Knowledge of SVG, a type of XML. Feel comfortable working on SVG, e.g. primitives, different shapes, text and fonts.
Knowledge of SVG, KML, and open source development from both work and school.
*Project goal*
KML SVG translation via XSLT - For use of Inkscape with Google Earth or Maps
Implement a XSLT template which could convert some useful info between KML and SVG, my current thought is like this:
KML < ---- > SVG
Points < ---- > circle/dot
Lines < ---- > path
Polygons < ---- > path
Screenoverlay < ---- > image
Implement C++ object to do the pre-processing to get rid of any unused nodes or elements, this could increase the performance of the xsltproc in the later step.
Implement GUI for this tool.
If I have time left, add the support for KMZ and binary SVG by using zlib.
Quoted info form Inkscape wiki:
Develop a translation (likely XSLT) between KML and SVG so KML files or icons can easily be created, edited, or viewed in Inkscape and for use in Google Earth or Maps. This becomes another piece in utilizing Inkscape's SVG editing capabilities in the geographical community ("geo" Inkscape). Several of us have discussed this as a potential Google Summer of Code project. I would be happy to serve as a mentor.
*Implementation planning:*
The general approach is to define a XSLT transformation template to convert between KML and SVG. Tool xlstproc will be used from libxlst which is in Inkscape code base already. Defining the convertible element list is the first thing. Eliminating unused nodes in the pre-processing step will increase processing speed or reduce the time. Design .inx files to create the GUI module.
Tasks break-down:
1. define our convertible element list between KML and SVG
2. write the logic to eliminate the unused element --- two way
3. implement the template for each pre-defined elements. --- two way
Write an internal extension for translating between KML and SVG
Use source code in src/extension/internal/ as examples. Study XSLT, libxml2 and libxslt, and review existing code that currently uses them. Write .xsl templates for XSLT to store KML data and be ready to convert to SVG.
Use /src/io/doc2html.xsl as an example.
Conversion between .xsl templates and SVG.
4. GUI implementation
Review existing input extensions (extension system)
Study GTK+ and gtkmm source code. (I have done C and GTK+ before, so it should be quick.)
Write .inx files with parameters to create GUI automatically
5. testing and bug fixing.
6. adding support for KMZ or binary SVG if have time
*Schedule:*
Assuming there are 14 weeks:
Week 1-2:
Communicate with mentor
Learning code base and background
Week 3:
Define our convertible element list between KML and SVG
Week 4-6:
2. write the logic to eliminate the unused element --- two way
3. implement the template for each pre-defined elements. --- two way
Week 7-9:
4. GUI implementation
Week 10-11:
testing and bug fixing.
Week 12-13:
6. adding support for KMZ or binary SVG
Week 14:
Debug and documentation
*Inkscape Questions*
I knew about Inkscape when I had a couple of SVG files to view. After that, I did lots of designs for better quality printing. It is very useful and free. It does many things that Illustrator can do.
*About Yourself*
· What is your name, email address, and irc nickname?
My name is David Xiong.
Email address: yunwxiong@...400...
· Describe any plans you have over the summer in addition to GSoC, such as classes, a summer job, vacation plans, master's thesis, etc.
No classes. Hope to get this project then I could focus something I am interested in.
· What programming projects have you done so far?
A lot projects from both school and work. From work, GPS project on the window and embedded system. Console game development, NBA live 09 Wii, Fifa 10 PC/PS2/PSP.
· Have you worked on other open source projects before? If so, please list and describe what you did.
not contribute, but have a lot experience with open source libs, such as ITK/VTK, zlib, NEMA lib, avrlib, Blackberry SDK, iphone SDK. I just work on my interests and my own small projects, such as developing tool in C# using ITK/VTK, zlib, Nema, libxml for the sailing software. My small games/apps on blackberry or iphone.
· Please list other projects you are applying to for GSoC.
One more Inkscape project. Best wishes,
David.
participants (1)
-
David Xiong