[OSM-dev] Osmosis split of the planet

Nic Roets nroets at gmail.com
Mon Feb 8 08:54:40 GMT 2010


I'm trying to split the planet into 170 overlapping bboxes like this:

http://dev.openstreetmap.de/gosmore/test/

But osmosis keeps running into the 4GB java limit, even after I made a split
down the Atlantic.
1. Split the planet into 3 bboxes: Americas, Europe / Africa /Asia
/Australia and a bbox that is just large enough to cover all the bboxes that
cross the dividing line.
2. Running osmosis for the 95 bboxes in the Americas fails.
3. Running osmosis for the 12 Atlantic bboxes succeeds.
4. Running osmosis for the 60 bboxes in Europe / Africa /Asia /Australia
fails:

gunzip <middle.osm.gz | ionice -c 3 nice -n 19 osmosis --read-xml
enableDateParsing=no file=/dev/stdin --tee 60 \
 --bb  idTrackerType="BitSet" left=73.12500 right=180.00000 top=9.44906
bottom=-85.05113 --wx 0720048510241024.osm.gz \
 --bb  idTrackerType="BitSet" left=120.58594 right=180.00000 top=72.91964
bottom=-25.48295 --wx 0855020310240587.osm.gz \
 --bb  idTrackerType="BitSet" left=98.43750 right=172.61719 top=13.23995
bottom=-85.05113 --wx 0792047410031024.osm.gz \
 --bb  idTrackerType="BitSet" left=100.19531 right=150.82031 top=30.14513
bottom=-75.84517 --wx 0797042209410852.osm.gz \
...

The obvious solution is just to repeat this algorithm until I find something
that will work. And the number of candidate splitting latitudes and
longitudes is small (4 times the number of bboxes), so evaluating them all
in software is feasible (esp. with dynamic programming).

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100208/09125d1d/attachment.html>


More information about the dev mailing list