[OSM-dev] Osmosis split of the planet

Frederik Ramm frederik at remote.org
Mon Feb 8 12:06:59 GMT 2010


Nic Roets wrote:
> Now my question is: Can I tell osmosis to work with intermediate streams 
> ? That would remove the need to gzip / gunzip and write / read from disk.

I think Brett may have read a more complicated question into this when 
he answered (or I am reading it too simplistic).

The solution to your problem might be to first split the file into a 
small number of large areas with BitSet, and then do the further 
splitting with IdList (or whatever the default is that uses less memory).

This can be done in one Osmosis invocation, because each stream in 
Osmosis can be given a name so you can make it clear on the command line 
which streams should process the output of which other streams. If you 
don't use names then Osmosis puts all new streams on a stack and uses 
them from there, but I believe that your situation might be one that 
does not work without assigning names.

   --rx file.osm
   --tee 4
   --bb ... idTrackerType=BitSet outPipe.0=region1
   --bb ... idTrackerType=BitSet outPipe.0=region2
   --bb ... idTrackerType=BitSet outPipe.0=region3
   --bb ... idTrackerType=BitSet outPipe.0=region4
   --tee inPipe.0=region1 outputCount=99
     --bb ... --wx region1.file1.osm
     --bb ... --wx region1.file2.osm
     --bb ... --wx region1.file99.osm
   --tee inPipe.0=region2 outputCount=99
     --bb ... --wx region2.file1.osm

Needless to say, this is all horribly inefficient, and calls for one 
Osmosis plugin that generates as many output streams as it has bboxes.


PS: Is it by design that some areas are not covered by any of your 

Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"

More information about the dev mailing list