<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103191/">http://git.reviewboard.kde.org/r/103191/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On November 20th, 2011, 1:43 p.m., <b>Guillaume Martres</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/103191/diff/1/?file=41540#file41540line62" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/geodata/data/GeoDataTrack.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">GeoDataTrack::GeoDataTrack( const GeoDataGeometry &other )</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">60</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">return</span> <span class="n">d</span><span class="o">-></span><span class="n">m_pointMap</span><span class="p">.</span><span class="n">size</span><span class="p">();</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">62</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">return</span> <span class="n">d</span><span class="o">-></span><span class="n">m_pointMap</span><span class="p">.</span><span class="n">size</span><span class="p">()</span><span class="hl"> </span><span class="o"><span class="hl">+</span></span><span class="hl"> </span><span class="n"><span class="hl">d</span></span><span class="o"><span class="hl">-></span></span><span class="n"><span class="hl">m_coordStack</span></span><span class="p"><span class="hl">.</span></span><span class="n"><span class="hl">size</span></span><span class="p"><span class="hl">()</span>;</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I guess this change (and others related) are because GPX trkpt can be without a time value (see http://www.topografix.com/GPX/1/1/#type_wptType) but it's rather ugly and means you lose information when converting to the KML format. It'd be better to do something like track.addPoint(QDateTime.invalid(), coord) in GPXtrkptTagHandler (which should translate to empty <time> tags in KML and nothing in GPX) and modify the last point added to the track instead of using appendWhen in GPXtimeTagHandler</pre>
 </blockquote>



 <p>On November 20th, 2011, 1:47 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;">Ok, I'll change that.</pre>
 </blockquote>





 <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>





 <p>On November 20th, 2011, 2:36 p.m., <b>Guillaume Martres</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;">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>
 </blockquote>







</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;">> ...but m_pointMap is a QMap<QDateTime, GeoDataCoordinates> and so can story only a single coordinate for QDateTime::invalid()) :/

What about QMultiMap then? :) Or do you want to prevent that also for other timestamps != invalid there could be multiple waypoints then?</pre>
<br />




<p>- Friedrich W. H.</p>


<br />
<p>On November 20th, 2011, 12:46 p.m., Niko Sams wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Marble.</div>
<div>By Niko Sams.</div>


<p style="color: grey;"><i>Updated Nov. 20, 2011, 12:46 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">gx:Track can contain ExtendedData used for embedding eg. heartrate data to a track:
http://code.google.com/intl/de-DE/apis/kml/documentation/kmlreference.html#gxtrack

This patch implements:
- the data structure in GeoDataTrack
- the kml parser for this structure (supporting example files in kml specs)
- the gpx parser for this structure (supporting files created by garmin devices)

Gpx parser also now handles elevation data.

Gpx parser now creates a GeoDataTrack object (instead of GeoDataLineString)
(I'm not sure if this change could cause problems)</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Unittests included in patch.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/lib/.TracksModel.cpp.kate-swp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/data/GeoDataExtendedData.h <span style="color: grey">(f095cdb)</span></li>

 <li>src/lib/geodata/data/GeoDataExtendedData.cpp <span style="color: grey">(4011240)</span></li>

 <li>src/lib/geodata/data/GeoDataExtendedData_p.h <span style="color: grey">(361e894)</span></li>

 <li>src/lib/geodata/data/GeoDataSimpleArrayData.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/data/GeoDataSimpleArrayData.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/data/GeoDataTrack.h <span style="color: grey">(2f0e0c3)</span></li>

 <li>src/lib/geodata/data/GeoDataTrack.cpp <span style="color: grey">(c8b5ccf)</span></li>

 <li>src/lib/geodata/data/Serializable.h <span style="color: grey">(cfa4b74)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlCoordinatesTagHandler.cpp <span style="color: grey">(dce7679)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlElementDictionary.h <span style="color: grey">(624465a)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlElementDictionary.cpp <span style="color: grey">(07f33fd)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlExtendedDataTagHandler.cpp <span style="color: grey">(669fb5e)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlSchemaDataTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlSchemaDataTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlSimpleArrayDataTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlSimpleArrayDataTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/geodata/handlers/kml/KmlValueTagHandler.cpp <span style="color: grey">(a2e5441)</span></li>

 <li>src/lib/geodata/parser/GeoDataTypes.h <span style="color: grey">(fee81bd)</span></li>

 <li>src/lib/geodata/parser/GeoDataTypes.cpp <span style="color: grey">(4443896)</span></li>

 <li>src/plugins/runner/gpx/CMakeLists.txt <span style="color: grey">(dae7719)</span></li>

 <li>src/plugins/runner/gpx/GpxParser.cpp <span style="color: grey">(61a749f)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXElementDictionary.h <span style="color: grey">(37152bd)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXElementDictionary.cpp <span style="color: grey">(471ad64)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXTrackPointExtensionTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXTrackPointExtensionTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXeleTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXeleTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXextensionsTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXextensionsTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXhrTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXhrTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXtimeTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXtimeTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXtrkptTagHandler.cpp <span style="color: grey">(455e8e1)</span></li>

 <li>src/plugins/runner/gpx/handlers/GPXtrksegTagHandler.cpp <span style="color: grey">(9b1a24e)</span></li>

 <li>src/plugins/runner/gpx/tests/TestTrack.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/TestGeoDataTrack.cpp <span style="color: grey">(c9f347d)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103191/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>