As usual i forgot to send it to the list.<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Jais Pedersen</b> <span dir="ltr"><<a href="mailto:jais@pedersens.net">jais@pedersens.net</a>></span><br>
Date: Wed, Sep 5, 2012 at 3:15 PM<br>Subject: Re: [OSM-dev] Osmosis - Cutting out a bounding box from a diff file (.osc)<br>To: Stéphane Henriod <<a href="mailto:s@henriod.info">s@henriod.info</a>><br><br><br>I setup a Vietnam tile server just for fun and I made a script that worked like this:<br>
<br>1. Make a copy of the Vietnam extract.<br>2. Apply the update to the copy<br>3. Clip the copy using the Vietnam clip bounds file (I think i made my own from the admin boundary, but it might have been the one from Geofabrik)<br>

4. Make a diff between the original and the copy<br>5. Apply the diff to the PostGIS database<br>6 Finally make the copy the new original for next update<br><br>Unfortunately the server died (it was a retired PC), so I no longer have the script and it never had more than a single digit number of users, so I don't know how it will perform under real load, but for a small (as in the amount of data) extract it seemed to work quite well - I never really checked how it worked with object that grew or was moved across the border, but i suspect that would not be handled so well.<br>

<br>I'm planning to setup a new one after the license change, so I would love to hear if anybody has a better way to do it.<br><br>/Jais<br><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Sep 5, 2012 at 2:19 PM, Stéphane Henriod <span dir="ltr"><<a href="mailto:s@henriod.info" target="_blank">s@henriod.info</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">PS: it looks like only the tables <br><ul><li>planet_osm_rels</li><li>planet_osm_ways</li>
</ul><p>Get data from outside my bounding box and thus grow extremely quickly. <br>
</p><p>Don't really know how to interpret this behavior!<br>
</p><div>--<br>"Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux" -- Albert Einstein<br><br>"A journey does not need reasons. Before long, it proves to be reason enough in itself. One thinks that one is going to make a journey, yet soon it is the journey that makes or unmakes you." -- Nicolas Bouvier<br>


<br>Photos de voyages, photos de montagne: <a href="http://www.henriod.info/" target="_blank">http://www.henriod.info</a><span dir="ltr"><span dir="ltr" title="Appeler ce numéro de téléphone en/au(x) Tadjikistan avec Skype : +992934624662"><span>  </span></span> <br>


</span><br>
<br><br></div><div><div><div class="gmail_quote">On Wed, Sep 5, 2012 at 8:56 AM, Stéphane Henriod <span dir="ltr"><<a href="mailto:s@henriod.info" target="_blank">s@henriod.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all<br><br>I now have a running process where I dowload the hourly diffs and those are applied to the PostGIS database with osm2pgsql.<br><br>My problem is that, despite the <i>osm2pgsql -b</i> option, it seems that my bounding box is ignored and the full diff file is added to my database, As a consequence, the database is growing very quickly and includes lots of data outside of my area of interest.<br>



<br>My question is thus: is it possible to cut out the bounding box from the diff file before calling osm2pgsql? If I understand correctly, the bounding-box task (<a href="http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--bounding-box_.28--bb.29" target="_blank">http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--bounding-box_.28--bb.29</a>) only works on planet files, not diff files. Correct?<br>



<br>Is there a way to get the following process working:<br><ol><li>Get the last hourly diff file</li><li>Extract from the diff file all the objects within my bounding box</li><li>Apply this to the PostGIS database with osm2pgsql</li>



</ol><p>Thanks in advance and best wishes</p><p></p><p>Stéphane<br></p>--<br>"Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux" -- Albert Einstein<br><br>"A journey does not need reasons. Before long, it proves to be reason enough in itself. One thinks that one is going to make a journey, yet soon it is the journey that makes or unmakes you." -- Nicolas Bouvier<br>



<br>Photos de voyages, photos de montagne: <a href="http://www.henriod.info/" target="_blank">http://www.henriod.info</a><span dir="ltr"><span dir="ltr" title="Appeler ce numéro de téléphone en/au(x) Tadjikistan avec Skype : +992934624662"><span>  </span></span> <br>



</span><br>
</blockquote></div><br>
</div></div><br></div></div>_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org" target="_blank">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
<br></blockquote></div><br>
</div><br>