***********Summary***********
Some key questions have been answered:
· XSLT can do the job for KML to SVG conversion
· Math can be done in XSLT, e.g. round, divide, math:log, math:tan, min, max and so on.
Some challenges:
It is difficult to implement algorithms in XSLT. Variable and passing is not so clear to deal with. XSLT notations are difficult to understand. Sometimes it takes a long time to write 100 lines of code.
Tasks to do:
Fix the loops and coordinates importing for more KML objects. Currently, it can handle lineString object (some other objects seem very similar).
What I have done to get the basic conversion working.
1. Read a lot of source code in Inkscape
2. Read a lot of materials on XSLT and transformation
3. I have written code for between 20 and 30 examples for practice in the tutorials: http://www.java2s.com/Tutorial/XML/0100__XSLT-stylesheet/Catalog0100__XSLT-stylesheet.htm
5. The online kml2svg is good resources. I had email discussion and questions with kml2svg author. He shared useful information. He is willing to share his work to Inkscape, saying he made kml2svg mainly because Inkscape does not have this feature.
6. I tried the online kml2svg approach too, without using XSLT. I tried reading and parsing the KML file and loop through the elements and attributes. It is very difficult to do that in Inkscape.
7. I broke Inkscape build and had crashes for several times.
No comments:
Post a Comment