<table><tr><td style="">tandon updated this revision to Diff 5222.<br />tandon marked 7 inline comments as done.<br />tandon added a comment.</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2128" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Compared to last time, results were quite according to expectations. Now  all the streets, which were previously rendered as broken now appear continuous. Also there good savings in terms of file size.( I have presented a few memory related statistics below)</p>

<p><strong>Fixes Done</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Using OSM node ID's instead of lon-lat coordinates as key values for the multi-hash-map</li>
<li class="remarkup-list-item">Added multi-hash-map to handle intersections, hence now corresponding to a node-id there can be 2 or more WayChunks</li>
<li class="remarkup-list-item">Using visual categories for concatenating/(differentiating among WayChunks)</li>
<li class="remarkup-list-item">Added reverse() method in GeoDataLineString</li>
<li class="remarkup-list-item">Refactored code to more modular units.</li>
<li class="remarkup-list-item">All the variable definitions are now near to where they are used.</li>
<li class="remarkup-list-item">Fix bugs related to improper reversal of WayChunks, concatenation of WayChunks having the same first and last IDs, proper insertion/deletion of key-value pairs in multi-hash-map during the execution of the tool.</li>
</ul>

<p><strong>Fixes Left</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Proper memory management.</li>
<li class="remarkup-list-item">Performing timing related tests.</li>
<li class="remarkup-list-item">Running the output file through the tile creation tool chain.</li>
</ul>

<p><strong>Doubts</strong><br />
There is a case in which a Way under consideration is inserted between 2 way chunks.<br />
Example: Suppose Way under consideration is <4,5> and there exists WayChunks <1,2,3,4>; <5,6,7> then the program will construct a WayChunk <1,2,3,4,5,6,7><br />
Now consider the following scenario:<br />
Way under consideration is <1,8,9,10,7> and there exists a WayChunk <1,2,3,4,5,6,7> then the program generates  nonsensical WayChunks. For now I am detecting such scenarios and directly adding the way under consideration to the output file hence removing this way from any future considerations.<br />
However due to this abrupt removal of such wayswe are getting a small variance in the final number of ways reduced ,every time we run the program on the same input file. Though this variance is not affecting rendering , this thing does result in a smaller total number of ways reduced.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rMARBLE Marble</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D2128?vs=5054&id=5222" rel="noreferrer">https://phabricator.kde.org/D2128?vs=5054&id=5222</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2128" rel="noreferrer">https://phabricator.kde.org/D2128</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/lib/marble/geodata/data/GeoDataLineString.cpp<br />
src/lib/marble/geodata/data/GeoDataLineString.h<br />
tools/osm-simplify/BaseFilter.cpp<br />
tools/osm-simplify/BaseFilter.h<br />
tools/osm-simplify/CMakeLists.txt<br />
tools/osm-simplify/TagsFilter.cpp<br />
tools/osm-simplify/TagsFilter.h<br />
tools/osm-simplify/WayChunk.cpp<br />
tools/osm-simplify/WayChunk.h<br />
tools/osm-simplify/WayConcatenator.cpp<br />
tools/osm-simplify/WayConcatenator.h<br />
tools/osm-simplify/main.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>tandon, rahn, nienhueser<br /><strong>Cc: </strong>rahn, Marble, marble-devel<br /></div>