<div dir="ltr"><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Hi,</span><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><br>
<br>
<span></span></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><span> </span></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">I
have written a small extension for OSM API database to offer the functionality
of real-time simplification of objects (ways, relations) by node filtering
during the query processing. The idea behind it is as followings:<span></span></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><br></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">1.
For each spatial object such as way or relation, attach weight value to each
component node by geometric computation. <span></span></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><br></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">2.
In processing query, only retrieve nodes with the top k weight. <span></span></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><br></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">3.
Assembly the simplified objects with filtered nodes. <span></span></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><span> </span></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><span style="font-size:12.6667px;text-indent:12.6667px">In fact, there are some really complex concepts, algorithms and data structures in the extension, but the essential idea is that simple. </span><span><br></span></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><span style="font-size:12.6667px;text-indent:12.6667px"><br></span></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">With
this extension, The OSM API database will have the ability to answer windowing
query with arbitrary size by a “top k” operator to limit the output volume of
the results. <span></span></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span style="font-size:12.6667px"><br></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span style="font-size:12.6667px">The purpose of the extension is to make the OSM API database can serve data in any scale like the tile server can do. </span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><br></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"> The codes in the extension is a bit of preliminary.
However, to make the idea work, Not only the code need to be examined and tested,
but also the database must be “normalized” to take the advantages of this
extension. <span></span></span></p><p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif"><br></span></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">The
code is hosted in github, <a href="https://github.com/rtosm/rtosm">https://github.com/rtosm/rtosm</a><span></span></span></p><p class="MsoNormal" style="text-indent:9.5pt"><br></p>

<p class="MsoNormal" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif">The "rtosm" means a database for real-time openstreetmap. </span><span style="font-size:9.5pt;text-indent:9.5pt">Welcome
to comment.</span><span style="font-size:9.5pt;text-indent:9.5pt"> </span></p></div>