[OSM-dev] How to keep a geographic local part of OSM updated with minutely diffs?

michael spreng mailinglist at osm.datendelphin.net
Tue Dec 1 20:03:34 UTC 2015



On 01/12/15 11:33, tb wrote:
>
>> Option 2:
>>
>> Instead of applying diffs to the database directly, do this:
>>
>> * download worldwide diffs
>> * apply them to an extract (file containing only your regional data)
>> with osmosis
>> * have osmosis cut out your polygon of interest from the resulting
>> updated file (since applying diffs will have added stuff outside your
>> region)
>> * have osmosis compare a diff between your previous local extract and
>> the new, updated local extract
>> * update your database with that diff
>
> This seems to be the best approach according to data quality. Another
> advantage is this works not only with bounding boxes but also with
> (multiple) polygons.
> But the disadvantage here is time: the computation of the three steps
> might take to much time and brings me way behind even by using
> minutely diffs. On the other hand i can start over every night by
> using a fresh cut my region(s) of interest.
> I'll give it a try and check the usage of time and resources.
>
Hi tb

On osm.ch we basically do what Frederik outlined as option two.

We use osmconvert (and osmupdate) instead of osmosis. In my experience
that is faster. An hourly update of our extract, including calculating
the diff and generating the new pbf, takes about 1 minute.

So you shouldn't do this minutely, but depending on the speed of your
machine you can have quite frequent updates. We still consume minutely
diffs, the aggregation is handled by osmupdate.

You can have a look at our extract and diffs on planet.osm.ch. We also
render maps based on these diffs at osm.ch

Michael





More information about the dev mailing list