<div dir="ltr">Hi!<br><br>Have you tried osm2pgsql and/or imposm? What is the reason to do it over API db schema?</div><br><div class="gmail_quote"><div dir="ltr">вт, 15 нояб. 2016 г. в 19:27, RTOSM DOOPAS <<a href="mailto:rtosmdb@gmail.com">rtosmdb@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><p class="MsoNormal gmail_msg"><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" class="gmail_msg">Hi,</span><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
<span class="gmail_msg"></span></span></p>

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

<p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg">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 class="gmail_msg"></span></span></p>

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

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

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

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

<p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg">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 class="gmail_msg"></span></span></p><p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span style="font-size:12.6667px" class="gmail_msg"><br class="gmail_msg"></span></p><p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span style="font-size:12.6667px" class="gmail_msg">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 gmail_msg" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg"><br class="gmail_msg"></span></p>

<p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg"> 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 class="gmail_msg"></span></span></p><p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg"><br class="gmail_msg"></span></p>

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

<p class="MsoNormal gmail_msg" style="text-indent:9.5pt"><span lang="EN-US" style="font-size:9.5pt;font-family:arial,sans-serif" class="gmail_msg">The "rtosm" means a database for real-time openstreetmap. </span><span style="font-size:9.5pt;text-indent:9.5pt" class="gmail_msg">Welcome
to comment.</span><span style="font-size:9.5pt;text-indent:9.5pt" class="gmail_msg"> </span></p></div>
_______________________________________________<br class="gmail_msg">
dev mailing list<br class="gmail_msg">
<a href="mailto:dev@openstreetmap.org" class="gmail_msg" target="_blank">dev@openstreetmap.org</a><br class="gmail_msg">
<a href="https://lists.openstreetmap.org/listinfo/dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br class="gmail_msg">
</blockquote></div>