On Mon, Dec 29, 2008 at 8:50 AM, Damian Proksch <span dir="ltr"><<a href="mailto:damian.proksch@gmx.de">damian.proksch@gmx.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
I have now another problem with osmosis:<br>
I'd wrote a small text file to sort and merge<br>
some OSM-files.<br>
Here are the text file:<br>
<br>
cd..<br>
cd..<br>
cd C:\osmosis-0.29<br>
java -Xmx1200m -jar osmosis.jar --rx enableDateParsing=no file="I:\OSM_Karten\Sorted\sorted_1.osm" --rx enableDateParsing=no file="I:\OSM_Karten\Sorted\sorted_2.osm" --m --wx file="I:\OSM_Karten\Planet\Planet.osm"<br>

<br>
java -Xmx1200m -jar osmosis.jar --rx enableDateParsing=no file="I:\OSM_Karten\Planet\Planet.osm" --sort type="TypeThenId" --wx file="I:\OSM_Karten\Planet\Planet.osm"  </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<snip> </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">anyone a idea what's going wrong?<br>
<br>
 My system is:<br>
Winxp prof SP3<br>
Intel Pentium 4 with 3GHz<br>
2.0 GB RAM<br>
<br>
Thanks a lot for your answers.<br>
<br>
damian<br>
</blockquote></div><br>In your second command, you're writing back to the same file you're reading from. That won't work because Osmosis is still reading from it. Also, you can accomplish your goal in a single command line by continuing to read and merge files. In other words (slightly simplified for clarity):<br>
<br>java -Xmx1200m -jar osmosis.jar --rx sorted_1.osm --rx sorted_2.osm --m --rx sorted_3.osm --m --rx sorted_4.osm --m --rx sorted_5.osm --m --rx sorted_6.osm --m --rx sorted_7.osm --m --wx Planet.osm<br><br>If your individual files are sorted the same way (i.e., Type then Id), the osmosis merge will preserve that sort, so there's no need to re-sort after a merge. Actually, the files are required to be sorted before they can be merged. Also, there's not much (if any) performance penalty now in leaving the date parsing enabled by default.<br>
<br>Karl<br>