[Kde-imaging] kml export and gps interpolation bugfix

Stéphane Pontier shadow.w at gmail.com
Thu Mar 29 12:03:46 CEST 2007


Hi,

I finally found time to work again on the kmlexport. I use QDom and merge it 
with gpssync plugin. It can now take a gpx file to create a track with the 
pictures.
Next thing to implement is to give user the choice of the track and picture 
style (color, width and elevation mode) but before going further, I wanted to 
have your opinion on this plugin.

To create the track I had to add a lineString method to the GPSDataParser 
class. The track created is time independent and cant be clicked. If I want 
to be able to create a track which can be clicked (to get information about 
to road taken between two picture for example) I have to create a new set of 
points using time and localisation of each gpx point. I can add this 
functionality to GPSDataParser class, but since it's more kml function 
related than GPS data parsing, isn't it cleaner to create a new class 
derivate from GPSDataParser to put all kml related method in ?


the diff file is here:
http://stpo.homelinux.org/data/gpssync-kmlexport.diff

the example file (for googleearth):
http://stpo.homelinux.org/data/kmltest/kmldocument.kml

the example file (for googlemaps):
http://stpo.homelinux.org/data/kmltest2/kmldocument.kml


When I checked the result on the map (see the examples) I was wondering why to 
points where standing out of the track (img_5161_jpg.jpeg and 
img_5168_jpg.jpeg). I found out that these two points where interpolated and 
found out that the formula to interpolate points should be 
point1 + (point2-point1) * (time3-time1)/(time2-time1)
instead of 
point1 + (point2-point1) * (time2-time1)/(time3-time1)
after using the attached patch, the pictures where interpolated correctly and 
get back to the track.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interpolation.diff
Type: text/x-diff
Size: 744 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-imaging/attachments/20070329/6f32f011/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-imaging/attachments/20070329/6f32f011/attachment.pgp 


More information about the Kde-imaging mailing list