[OSM-dev] Osmosis Output Error

Andrew Ayre andy at britishideas.com
Wed Dec 10 02:13:47 GMT 2008

Brett Henderson wrote:
> Andrew Ayre wrote:
>> Thanks for looking into this. I added --sort after each input file 
>> name and it still gives the same error. The OSM map file was generated 
>> by osmosis, which I used to split planet.osm.
>> java -Xmx1560m -jar /home/nav/scripts/osmosis.jar --read-xml 
>> file="/home/nav/temp/tile.63255095.osm" --sort --read-xml 
>> file="/home/nav/temp/eletile.63255095.osm" --sort --merge --write-xml 
>> file="/home/nav/temp/mergedtile.63255095.osm"
> I had a quick play and think I've found the problem.
> Firstly, when you receive an error in osmosis, look further down the 
> stack trace.  The real reason is almost always in there somewhere.  
> Osmosis is multi-threaded so it is difficult to have the real reason 
> show up at the start of the error message.  In your case the first bit 
> of error was from the input xml readers detecting that the merge task 
> had aborted.  The merge task output was further down the error messages.
> In this case there were two problems:
> 1. The data was unsorted.
> 2. Some data doesn't appear to have dates attached (I haven't found the 
> offending entry yet).
> This command line works:
> osmosis --rx tile.63255095.osm.gz enableDateParsing=false --sort --rx 
> eletile.63255095.osm.gz enableDateParsing=false --sort --merge --wx 
> out.osm.gz
> It sorts all data before the merge, and ignores all dates in the input 
> data (replacing them with current system time).  This is a bit of a 
> kludge, ideally the data itself should be fixed to include the correct 
> dates but hopefully it points you in the right direction.

Thanks Brett - that did the trick! Sorry to have bothered you and Karl 
with an operator error. The quick help is much appreciated. :)


PGP Key ID: 0xDC1B5864

More information about the dev mailing list