[osmosis-dev] New tasks to manipulate the declared bounding box of a stream

Igor Podolskiy igor.podolskiy at vwi-stuttgart.de
Sun Sep 25 19:11:58 BST 2011


Hi @osmosis-dev,

in the last months there have been a couple of discussions and/or bug 
reports that involve the Bound entity (<bound> element in OSM XML) on 
this list, the most recent taking place last week.

Osmosis in its current state pays attention to the bound entity, at 
least as good as it can. Unfortunately, due to the fundamental way of 
how Osmosis works, it can't do very good in many cases (for example, 
--apply-changes currently does not change the bound of the entity stream 
and also does not delete it).

Some application seem to rely on the bounding box declared in the files, 
leading to problems when Osmosis just passed some bounding box 
declaration through.

To date, Osmosis also doesn't let the user manipulate the declared 
bounding box in any way, so an user has no chance to fix the bounding 
box problem even if he or she knows better than Osmosis. I propose two 
new tasks that allow manipulation of the bound entity:

  * --set-bounding-box/--sbb lets the user force a value of the bounding 
box for a stream or to remove it altogether
  * --compute-bounding-box examines every node in a stream, computes a 
minimum bounding rectangle and introduces a new bound entity or replaces 
the existing one based on this

You can view the proposed (and fairly straightforward) implementation of 
the tasks at this GitHub branch:

https://github.com/podolsir/osmosis-trunk-mirror/tree/bound-tasks

or as a diff:

https://github.com/podolsir/osmosis-trunk-mirror/compare/work-base...bound-tasks

There are also unit tests for the new bits, it builds, passes checkstyle 
and so on.

What do you think? Are there any objections to incorporating this into 
the current trunk? Anything that I should fix before?

Greetings from Stuttgart
Igor



More information about the osmosis-dev mailing list