<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:Verdana,Arial,Helvetica,Sans-Serif"><blockquote style="margin-left:1em;border-left:2px solid #d0d0d0;padding-left:10px">

<div class="im"><p>On November 20th, 2011, 2:14 p.m., <b>Niko Sams</b> wrote:</p>
 <blockquote style="margin-left:1em;border-left:2px solid #d0d0d0;padding-left:10px">
  <pre style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">...but m_pointMap is a QMap<QDateTime, GeoDataCoordinates> and so can story only a single coordinate for QDateTime::invalid()) :/</pre>


 </blockquote>







</div></blockquote>
<pre style="margin-left:1em;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">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.</pre></div></div></blockquote><div>discarding is not an option, as it is quite common for gpx files to have no time information.</div>

<div>I'm not sure if your example is relevant - in practice the whole track contains time information - or not at all.</div><div>But it would be more accurate if it is supported.</div><div>What do you think about dropping the QMap and replacing it with two lists?</div>

<div>I don't know about performance requirements in your case - if needed some additional index as cache would help?</div><div><br></div><div>Niko</div></div>