[OSM-dev] problem with osmosis

Karl Newman siliconfiend at gmail.com
Mon Dec 29 17:07:21 GMT 2008

On Mon, Dec 29, 2008 at 8:50 AM, Damian Proksch <damian.proksch at gmx.de>wrote:

> Hello,
> I have now another problem with osmosis:
> I'd wrote a small text file to sort and merge
> some OSM-files.
> Here are the text file:
> cd..
> cd..
> cd C:\osmosis-0.29
> 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"
> 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"


anyone a idea what's going wrong?
>  My system is:
> Winxp prof SP3
> Intel Pentium 4 with 3GHz
> 2.0 GB RAM
> Thanks a lot for your answers.
> damian

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):

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

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081229/6fb4d7e0/attachment.html>

More information about the dev mailing list