A package to use the OSM replication infrastructure.
OsmSharp enables you to use the OSM replication system from the OSM planet server (and similar services) to keep local OSM data up to date. This package allows to:
- Get all changes between two dates/times.
- Download the associated diffs.
OsmSharp can then be used to apply the diffs.
PM> Install-Package OsmSharp.Replication
The most common use case is to stream diffs from a date/time in the past:
var thePast = DateTime.Now.AddHours(-2).AddDays(-5);
var catchupEnumerator = new CatchupReplicationDiffEnumerator(thePast);
while (await catchupEnumerator.MoveNext())
{
var current = catchupEnumerator.State;
var diff = await catchupEnumerator.Diff();
// do something with the diff here!
}