<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/123579/">https://git.reviewboard.kde.org/r/123579/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Marble.</div>
<div>By Alejandro GarcĂa Montoro.</div>
<p style="color: grey;"><i>Updated May 10, 2015, 11:37 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">This update makes the following changes:
#### GeoDataCoordinates.h
* Four public functions for UTM-related work are added: `utmZone()`, `utmLatitudeBand()`, `utmEasting()` and `utmNorthing()`.
* The `{lon,lat,lonLat}ToUTMString()` are deleted, as all the work is done from the `{lon,lat}ToString`. In these latter functions, a `@FIXME` comment is added, as a further bigger refactoring is needed: by now, the `{lon,lat}toString` functions only receive longitude or latitude values; in UTM, both of them are needed to obtain the correct values. This scenario produces some misbehaviours in the exceptional zones. I will open a bug report if this review request is accepted.
#### GeoDataCoordinates_p.h
* All UTM mathematical functions and constants are now located in GeoDataCoordinates_p.h
#### GraticulePlugin.cpp
* The UTM grid had a bug in the rendering of the 31X zone: it starts in the standard longitude, but the previous code drew its line 3 degrees to the right.
* The precision needed when labelling UTM zones is 0 (only zone or latitude band should be showed, not easting nor northing)
#### TestGeoDataCoordinates.cpp
* The TestGeoDataCoordinates.cpp file is updated with a new function, `testUTM()`, in which the public UTM-related functions -`utmZone()`, `utmLatitudeBand()`, `utmEasting()` and `utmNorthing()`- are tested. Randomly located values, but convering all the exceptional zones, are used.
#### Other changes
All the issues opened are now fixed:
* Variable names and the position of their declaration were reviewed.
* UTM mathematical functions returns coordinates through a QPointF.
* QString format is now used.
* Typos fixed.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Two different tasks have been accomplished concerning UTM coordinate system:</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">The UTM grid rendering has been fixed. Now the grid and labels are drawn as expected (see http://upload.wikimedia.org/wikipedia/commons/e/ed/Utm-zones.jpg for comparison)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Some UTM functions have been added in order to properly calculate and display the coordinates on the status bar. Those functions have been wrapped in the new GeoDataUTM namespace inside GeoDataCoordinates.cpp If you prefer to see the functions integrated in the GeoDataCoordinates class, please, let me know.</li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Still to be fixed</strong>: The UTM string showed in the status bar is too long for the text field in which it is shown. I have not been able to change its size, as I have not found the relevant .ui file; where in the code should I check to change that?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Note</strong>: The lat/lon <-> UTM conversion algorithm has been adapted from this JavaScript code http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html. The author says in the page "The JavaScript source code in this document may be copied and reused without restriction", and I have linked the website in the code. However, as I am not sure about all the licenses and authoring stuff, I would like you to review it.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Changes tested in master branch @ 1st May.
Grid and coordinates work well (except for the displaying issue explained above) and are consistent with the UTM coordinate system.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/apps/marble-kde/marble_part.cpp <span style="color: grey">(283ad87a39f91e01c391a4dd8f4c9ddbeef41481)</span></li>
<li>src/apps/marble-qt/QtMainWindow.cpp <span style="color: grey">(c4280c62b4534b7d10387b6895d142920f957bb7)</span></li>
<li>src/lib/marble/geodata/data/GeoDataCoordinates.h <span style="color: grey">(6efabd047f8f3aff63381facb78cb371c0740bf4)</span></li>
<li>src/lib/marble/geodata/data/GeoDataCoordinates.cpp <span style="color: grey">(fe74a2e42db921b152a29ef04246ceaaa16c2325)</span></li>
<li>src/lib/marble/geodata/data/GeoDataCoordinates_p.h <span style="color: grey">(7b84e860c11937602b66faef2cee6b9cc403a132)</span></li>
<li>src/plugins/render/graticule/GraticulePlugin.cpp <span style="color: grey">(a5e6d14a921c66d55cf01e39b16564dedcf6532b)</span></li>
<li>tests/TestGeoDataCoordinates.cpp <span style="color: grey">(a38b090104503f021fb98eed5f3f4394c10d5f8f)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/123579/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/05/01/505df756-87f2-47bb-a6c1-d5b52629547a__NorwayScreenshot.png">UTM grid exceptions around Norway</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>