[OSM-dev] Merging Changes with Bounding Boxes

Toby Murray toby.murray at gmail.com
Fri Jul 15 15:35:00 BST 2011


The problems with change files + bounding boxes is that the change
file only contains the NEW version of objects. So when you clip it to
a bounding box, nodes that started out inside of the bbox and were
moved outside will get eliminated from the change and you will keep
the old version of the node in your database.

Depending on your needs you might be able to get away with this if you
leave a big enough buffer around the data that you really want to keep
up to date. Any data in this buffer zone should not be trusted.

I'm also not sure what happens to changes that don't affect any
geometry. For example if all you do in a changeset is modify a
relation, it kind of breaks the changeset bounding box on osm.org so
I'm not sure what would happen when clipping the change. (
http://trac.openstreetmap.org/ticket/1861 )

Toby

On Fri, Jul 15, 2011 at 6:34 AM, Andrew Ayre <andy at britishideas.com> wrote:
> Hi, currently I extract a piece of map data and store it. Later on I
> want to apply a set of changes to it. Here are my commands:
>
> osmosis --read-pbf britishisles.osm.pbf --buffer bufferCapacity=12000
> --bb bottom=51 top=52 left=-1 right=1 --write-pbf london.osm.pbf
>
> osmosis --read-xml-change changes.osc --read-pbf london.osm.pbf
> --apply-change --buffer bufferCapacity=12000 --bb top=52 bottom=51
> left=-1 right=1 --write-pbf londonnew.osm.pbf
>
> The merge command takes 40 seconds to run but I have to do this a lot,
> so I am wondering if it is possible to clip the changes to a bounding
> box before the merge? Would that improve performance? For example
> changes.osc might cover the whole of the planet.
>
> I tried adding a --bb command after --read-xml-change but Osmosis
> complained the input format was the wrong type.
>
> Or is it that applying the change and then the bounding box yields the
> best performance performance?
>
> thanks, Andy
>
> --
> Andy
> PGP Key ID: 0xDC1B5864
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>



More information about the dev mailing list