[Marble-devel] Review Request: GeoData KML and GPX Parser: parse ExtendedData in gx:Track

Niko Sams niko.sams at gmail.com
Sun Nov 20 15:02:18 UTC 2011


>
> On November 20th, 2011, 2:14 p.m., *Niko Sams* wrote:
>
> ...but m_pointMap is a QMap<QDateTime, GeoDataCoordinates> and so can story only a single coordinate for QDateTime::invalid()) :/
>
>  Yes, this complicates things. We should either discard the points without a time or if we want to fully support the kml and gpx specs, we may need to use another data structure to preserve order, for example, the following is valid:
>     <gx:Track>
>       <when>2010-05-28T02:02:09Z</when>
>       <when></when>
>       <when>2010-05-28T02:02:44Z</when>
>       <when></when>
>       <when>2010-05-28T02:02:54Z</when>
>       <gx:coord>-122.207881 37.371915 156.000000</gx:coord>
>       <gx:coord>-122.205712 37.373288 152.000000</gx:coord>
>       <gx:coord>-122.204678 37.373939 147.000000</gx:coord>
>       <gx:coord>-122.203572 37.374630 142.199997</gx:coord>
>       <gx:coord>-122.203451 37.374706 141.800003</gx:coord>
>     </gx:Track>
>
> And I'm not familiar with GPX but the following is probably valid:
>       <trkpt lat="47.644548" lon="-122.326897">
>         <ele>4.46</ele>
>         <time>2009-10-17T18:37:26Z</time>
>       </trkpt>
>       <trkpt lat="47.644548" lon="-122.326897">
>         <ele>4.94</ele>
>       </trkpt>
>       <trkpt lat="47.644548" lon="-122.326897">
>         <ele>6.87</ele>
>         <time>2009-10-17T18:37:34Z</time>
>       </trkpt>
>
> In both cases, simply putting the points without a time in a list is not enough, we need to know the time value of the point before and the one after.
> Or we could just discard points without a time if supporting this is too much work for too little benefit.
>
> discarding is not an option, as it is quite common for gpx files to have
no time information.
I'm not sure if your example is relevant - in practice the whole track
contains time information - or not at all.
But it would be more accurate if it is supported.
What do you think about dropping the QMap and replacing it with two lists?
I don't know about performance requirements in your case - if needed some
additional index as cache would help?

Niko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20111120/6e413c94/attachment.html>


More information about the Marble-devel mailing list