[OSM-dev] osm2pgsql bbox filter when applying diffs? - extend: compare with osmosis

Marco Lechner - FOSSGIS e.V. marco.lechner at fossgis.de
Fri Mar 26 08:08:35 GMT 2010


Hi Lars,

I'm doing some experiments to get a solution for the same (using a
bounding polygon instead of bbox) question using osmosis. I did some
experiments using osmosis, but ran into problems.

I tried the following:

1. update using merged daily-diffs:
1.1 get one-week-old-planet.osm
1.2 cut AOI (--bp) from one-week-old-planet.osm (incl. sorting and
completeWays and completeRelations)
1.3 get all the daily-diffs from last week to now
1.4. merge the 7 diffs (sorting at each merge and write task)
1.5 apply the merged diff to my one-week-old-AOI.osm
1.6 cut AOI (--bp) from patched-AOI.osm (incl. sorting and completeWays
and completeRelations)

2. compare with recent AOI.osm
2.1 get recent-planet.osm
2.2 cut AOI (--bp) from recent-planet.osm (incl. sorting and
completeWays and completeRelations)

=> expectation: there should be no differences comparing the
recent-AOI.osm and the patched-AOI.osm

3. update using applying the diffs step by step
3.1 get one-week-old-planet.osm
3.2 cut AOI (--bp) from one-week-old-planet.osm (incl. sorting and
completeWays and completeRelations)
3.3 get all the daily-diffs from last week to now
3.4 apply and cut to one-week-old-AOI.osm for each daily-diff (always
incl. sorting and completeWays and completeRelations) =>
multipatched-AOI.osm

=> expactation: there should be no differences comparing any pair of
recent-AOI.osm, patched-AOI.osm and the multipatched-AOI.osm

But this workflow produces three different "*-AOI.osm"

For the tests I used osmosis from trunk (rev. 20665), because there was
a change focusing the completeRelations feature.

Marco



Lars Lingner schrieb:
> John Smith schrieb:
>   
>> On 25 March 2010 17:54, Frederik Ramm <frederik at remote.org> wrote:
>>     
>>>    is the osm2pgsql bbox filter also usable for applying diffs  (in a
>>> situation where somebody wants to keep a country extract in osm2pgsql
>>> form up to date), or does it only work for full imports?
>>>       
>> I think it only filters nodes, I haven't checked for a while but
>> previously I had ways with no nodes in the database outside the area I
>> was filtering...
>>
>>     
>
> What would be the best way to keep an individual extent updated?
>
> Fetching the planet, extracting the extent of the area of interest and
> create my own diffs?
>
> I could also apply the planet wide diffs and remove everything outside
> of the extent afterwards. But I don't like this idea.
>
> Is there a way to process the diff files in a way that the diff only
> contains changes in my area of interest?
>
> Thanks for any hints.
>
>
> Lars
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>   





More information about the dev mailing list