On Tue, May 3, 2011 at 12:48 PM, Peter Körner <span dir="ltr"><<a href="mailto:osm-lists@mazdermind.de">osm-lists@mazdermind.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Am 02.05.2011 17:38, schrieb Frederik Ramm:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Martijn van Exel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Revisiting this old thread. I seem to remember this script was<br>
superseded / made obsolete by something else, but can't find what /<br>
where.<br>
</blockquote>
<br>
</blockquote></div>
Hi<br>
<br>
I just finished the first stage of my history splitter. It two splitting modes of which one is finished.<br>
<br>
The "hard cut" mode features:<br>
 - single pass<br>
 - if an object is in the extract, all versions of it are there<br>
 - keeps the "visible" attribute<br>
 - ways are cropped at bbox boundaries<br>
 - relations contain only members that exist in the file<br>
 - ways and relations are reference-complete<br>
 - needs only 170 MB RAM per BBOX<br>
<br>
It's based on the osmium framework. Building it is a little complicated, as I have made changes to the osmium framework that are not yet merged into the main development line, but I'm in contact with jochen about this.<br>


<br>
You need<br>
 - the xml_tree branch of my osmium version:<br>
   <<a href="https://github.com/MaZderMind/osmium/tree/xml_output" target="_blank">https://github.com/MaZderMind/osmium/tree/xml_output</a>><br>
     run: git clone git@github.com:MaZderMind/osmium.git<br>
          git checkout xml_output<br>
<br>
 - all prequisites mentioned in the readme file at<br>
   <<a href="https://github.com/MaZderMind/osmium/tree/xml_output" target="_blank">https://github.com/MaZderMind/osmium/tree/xml_output</a>><br>
<br>
 - the splitter itsself<br>
<br>
<<a href="https://github.com/MaZderMind/OpenStreetMap-History-API/tree/master/splitter" target="_blank">https://github.com/MaZderMind/OpenStreetMap-History-API/tree/master/splitter</a>><br>
<br>
and run it like that:<br>
  bzcat path/to/full/history.osm.bz2 | ./splitter - example.config<br>
<br>
this runs the above mentioned "hard cut" algorithm that changes ways and relations to be completely inside the box. You can read about the algorithm its features and disadvantages here: <<a href="https://github.com/MaZderMind/OpenStreetMap-History-API/blob/master/splitter/hardcut.hpp" target="_blank">https://github.com/MaZderMind/OpenStreetMap-History-API/blob/master/splitter/hardcut.hpp</a>><br>


<br>
In the next step I'll implement the "soft cut" algorithm that keeps ways completed (you can read about it here: <<a href="https://github.com/MaZderMind/OpenStreetMap-History-API/blob/master/splitter/softcut.hpp" target="_blank">https://github.com/MaZderMind/OpenStreetMap-History-API/blob/master/splitter/softcut.hpp</a>>).<br>


<br>
I'll try to provide several extracts in different sizes for the Hack Weekend in Essen.<br><font color="#888888">
<br>
Peter<br>
</font></blockquote></div><br>Peter -- great, I'm trying this to generate an extract of Amsterdam from the full history planet. I don't mind hard cut for now. <br>Did everyone notice there is a new full history planet available by the way? Thanks Matt (I suppose you did this again). <br>

<br>Martijn<br>-- <br>Martijn van Exel<br><a href="http://about.me/mvexel" target="_blank">http://about.me/mvexel</a><br>