<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/106013/">http://git.reviewboard.kde.org/r/106013/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 14th, 2012, 7:44 p.m., <b>Torsten Rahn</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/106013/diff/1/?file=77674#file77674line84" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/StackedTile.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; ">static const uchar **jumpTableFromQImage8( const QImage &img )</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">84</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="c1">// VectorTile shouldnt call this method</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;">Did you check by chance whether this couldn't even happen for TextureTiles? - Anyways, good that this is checked for (and yes that is one of the cases where I wouldn't favor an assert.</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;">I wrote the comment in the begining because for image tiles that was a very important method for downloading tiles and creating the map. VectorTile doesn't call this method al all now.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 14th, 2012, 7:44 p.m., <b>Torsten Rahn</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/106013/diff/1/?file=77683#file77683line112" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/TileLoader.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">GeoDataDocument *TileLoader::loadTileVectorData( TileId const & tileId, DownloadUsage const usage, QString const &format )</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">112</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">Q_ASSERT</span><span class="p">(</span> <span class="n">status</span> <span class="o">==</span> <span class="n">Expired</span> <span class="p">);</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;">Hm, what is the reason for not accepting the Expired status? Is it just to trigger the "insert code here" action once the feature is added in the future?</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;">This was already in the code. Currently if the execution gets there "Expired" is the only possible tile status (Missing, Expired, Available) but I guess this is in case in the future more status are created.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 14th, 2012, 7:44 p.m., <b>Torsten Rahn</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/106013/diff/1/?file=77697#file77697line78" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/geodata/data/GeoDataLatLonAltBox.h</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; ">class GEODATA_EXPORT GeoDataLatLonAltBox : public GeoDataLatLonBox</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">78</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">uint</span> <span class="n">qHash</span><span class="p">(</span><span class="k">const</span> <span class="n">GeoDataLatLonAltBox</span> <span class="o">&</span><span class="p">);</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;">What is the use-case of such an API inside GeoDataLatLonAltBox? Why is it needed? :)</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;">VectorTileLayer keeps a GeoDataLatLonAltBox inside a qCache ( QCache< GeoDataLatLonAltBox, CacheDocument> m_documents ) for all vector tiles that are being displayed in the screen ( in other words, all the tiles that are inside the TreeModel ). 

This qCache is checked everytime the map is moved by comparing if every GeoDataLatLonAltBox intersects with the map views GeoDataLatLonAltBox. So if a tile does not intersect any more, it is removed from the TreeModel ( only from the treeModel, the tile is not deleted ) for it to be as lighter as possible and to have just the minimum amount of geometries that need to be rendered inside the screen.

So for using a GeoDataLatLonAltBox as a Key inside the qCache, the qHash method is needed.</pre>
<br />




<p>- Ander</p>


<br />
<p>On August 14th, 2012, 2:37 p.m., Ander Pijoan 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 Ander Pijoan.</div>


<p style="color: grey;"><i>Updated Aug. 14, 2012, 2:37 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;">More documentation can be found here: http://techbase.kde.org/Projects/Marble/GSoC2012

Review Request #106009 needs to be previously submitted, for this to work.

During this GSoC2012 n order to make Marble download, render and manage vector data tiles, some classes have been created. The download url written in the .dgml file will download the tiles according to OpenStreetMaps tile names and it will try to parse them with all Marble's parsers. This GSoC tests have been made with the .dgml file included in this review and Kothic's server json tiles (hosted on http://osmosnimki.ru/vtile/ - please don't use it heavily-loaded projects for now) while OpenStreetMap finishes building its own data tile server. These Kothic tiles have a very similar format (https://github.com/kothic/kothic-js/wiki/Tiles-format) to the ones that OSM will have.

When Vector data is parsed it is stacked in an abstract class Tile (which is extended by ImageTile or VectorTile depending on the map) and is sent to VectorTileLayer which renders it.</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;">Testing done with the .dgml and the files attached.</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>data/CMakeLists.txt <span style="color: grey">(d612723)</span></li>

 <li>data/maps/earth/vectorosm/0/0/0.jpeg <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/0/0/0.js <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/0/0/0.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend.html <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/airportapron.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/airportrunway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/boundary.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/bridge.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/bridleway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/byway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/cycleway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/footway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/motorway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/primaryroad.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/railway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/railwaystation.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/secondaryroad.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/significantbuilding.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/subway.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/summitpeak.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/track.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/tram.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/trunkroad.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/tunnel.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/unclassifiedroad.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/legend/unsurfacedroad.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/srtm.jpg <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/vectorosm-preview.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/maps/earth/vectorosm/vectorosm.dgml <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/CMakeLists.txt <span style="color: grey">(5d05e21)</span></li>

 <li>src/lib/DownloadRegion.cpp <span style="color: grey">(a36dc60)</span></li>

 <li>src/lib/DownloadRegionDialog.cpp <span style="color: grey">(a67c7aa)</span></li>

 <li>src/lib/ElevationModel.h <span style="color: grey">(69f7e6a)</span></li>

 <li>src/lib/ElevationModel.cpp <span style="color: grey">(6e36298)</span></li>

 <li>src/lib/FileStoragePolicy.cpp <span style="color: grey">(6a505b7)</span></li>

 <li>src/lib/FileStorageWatcher.cpp <span style="color: grey">(27c5dae)</span></li>

 <li>src/lib/GeoDataTreeModel.cpp <span style="color: grey">(7c5649d)</span></li>

 <li>src/lib/GeoGraphicsScene.cpp <span style="color: grey">(d03886f)</span></li>

 <li>src/lib/GeoPainter.cpp <span style="color: grey">(f57a3ca)</span></li>

 <li>src/lib/MapWizard.cpp <span style="color: grey">(068e710)</span></li>

 <li>src/lib/MarbleMap.cpp <span style="color: grey">(a0e2b8b)</span></li>

 <li>src/lib/MarbleModel.cpp <span style="color: grey">(838c704)</span></li>

 <li>src/lib/MarbleRunnerManager.cpp <span style="color: grey">(a0b8f0d)</span></li>

 <li>src/lib/MergedLayerDecorator.h <span style="color: grey">(1a6906d)</span></li>

 <li>src/lib/MergedLayerDecorator.cpp <span style="color: grey">(119a3e2)</span></li>

 <li>src/lib/ScanlineTextureMapperContext.h <span style="color: grey">(06518b0)</span></li>

 <li>src/lib/ScanlineTextureMapperContext.cpp <span style="color: grey">(ff3197b)</span></li>

 <li>src/lib/ServerLayout.h <span style="color: grey">(04c244f)</span></li>

 <li>src/lib/ServerLayout.cpp <span style="color: grey">(3a67f41)</span></li>

 <li>src/lib/SphericalScanlineTextureMapper.cpp <span style="color: grey">(0d6bb93)</span></li>

 <li>src/lib/StackedTile.h <span style="color: grey">(aac0126)</span></li>

 <li>src/lib/StackedTile.cpp <span style="color: grey">(a230b62)</span></li>

 <li>src/lib/StackedTileLoader.h <span style="color: grey">(87dd6b6)</span></li>

 <li>src/lib/StackedTileLoader.cpp <span style="color: grey">(812a4ed)</span></li>

 <li>src/lib/StackedTile_p.h <span style="color: grey">(2e6188c)</span></li>

 <li>src/lib/TextureTile.h <span style="color: grey">(bf6e33f)</span></li>

 <li>src/lib/TextureTile.cpp <span style="color: grey">(97bae36)</span></li>

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

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

 <li>src/lib/TileLoader.h <span style="color: grey">(c2f68ec)</span></li>

 <li>src/lib/TileLoader.cpp <span style="color: grey">(1ca214b)</span></li>

 <li>src/lib/TileScalingTextureMapper.cpp <span style="color: grey">(1ee41a5)</span></li>

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

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

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

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

 <li>src/lib/blendings/Blending.h <span style="color: grey">(ae56e7a)</span></li>

 <li>src/lib/blendings/BlendingAlgorithms.h <span style="color: grey">(49d3206)</span></li>

 <li>src/lib/blendings/BlendingAlgorithms.cpp <span style="color: grey">(07ce60e)</span></li>

 <li>src/lib/blendings/SunLightBlending.h <span style="color: grey">(6628d22)</span></li>

 <li>src/lib/blendings/SunLightBlending.cpp <span style="color: grey">(6f2f8fb)</span></li>

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

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

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

 <li>src/lib/geodata/data/GeoDataLatLonAltBox.h <span style="color: grey">(15f7d16)</span></li>

 <li>src/lib/geodata/writers/dgml/DgmlTextureTagWriter.cpp <span style="color: grey">(202ea85)</span></li>

 <li>src/lib/layers/CMakeLists.txt <span style="color: grey">(7b46acf)</span></li>

 <li>src/lib/layers/GeometryLayer.cpp <span style="color: grey">(9ec92aa)</span></li>

 <li>src/lib/layers/TextureLayer.h <span style="color: grey">(b6e74d9)</span></li>

 <li>src/lib/layers/TextureLayer.cpp <span style="color: grey">(f5de718)</span></li>

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

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

 <li>src/marble_part.cpp <span style="color: grey">(808ca59)</span></li>

 <li>src/tilecreator/CMakeLists.txt <span style="color: grey">(2963831)</span></li>

 <li>tests/TestGeoSceneWriter.cpp <span style="color: grey">(4b88580)</span></li>

</ul>

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




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








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