[OSM-dev] Osmosis Output Error

Brett Henderson brett at bretth.com
Wed Dec 10 03:43:56 GMT 2008

Andrew Ayre wrote:
> Brett Henderson wrote:
>> 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.
> I have just noticed that in all the merged files the closing </osm> 
> tag is missing. The file just stops. Could there be also missing data 
> from the file as well?
When I merge your two files, the output file has a closing osm tag.  Did 
osmosis complete successfully?  It should have thrown an exception if 
something went wrong.

I'm using a slightly older osmosis (one already installed on my laptop), 
so perhaps something is different.  I'll test with an up to date version 
later to make sure.

More information about the dev mailing list