[OSM-dev] Osmosis - sorted streams

Brett Henderson brett at bretth.com
Fri Dec 21 22:54:53 GMT 2007


Frederik Ramm wrote:
> Hi,
>
>   two questions regarding sorted streams in Osmosis:
>
> 1. does --m/--mc depend on the input streams being sorted? It is not
> documented as doing so but any pipelining algorithm I can think of
> would essentially require sorted input.
>   
Yep, they require sorted input.  I should add a validation check in the 
code to error if non-sorted input is detected.  And I should add 
documentation to the wiki ...

I'll need to check other tasks but there may be others that require 
sorted input.  From memory (I don't have code in front of me) the 
IndexedObjectStore class relies on sorted input but I'm not sure if it 
is currently used ...  In any case, the IndexedObjectStore will detect 
out of order input and raise an error.
> 2. provided all inputs are sorted, which Osmosis tasks will create
> *unsorted* output? --bp/--bb with completeWays/completeRelations
> perhaps? Any others?
>
>   
In general, all other tasks should provide sorted output with the 
following exceptions:
1. --read-xml and --read-xml-change will produce whatever ordering is in 
the input file.
2. --sort-change with type=seekable will produce an ordering suitable 
for maintaining referential integrity which is not sorted in the normal 
sense.  type=streamable produces the standard sorted ordering.
3. Tasks such as --buffer are dependent on the input data, but will 
preserve input ordering.
4. Everything else I've missed ;-)

Brett





More information about the dev mailing list