You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get this to work for a few days. Using the Nuget package of OSM.Replication seems to always come back with no config (but the actual code and functional tests seem to work great). My big question is how do I apply the diffs? I was using the ApplyChanges function, but can't see the datemodified of the pbf file change-- so no idea if that's actually happening. An example code snippet would be great. Thank you.
The text was updated successfully, but these errors were encountered:
I think you are doing it correctly but you also need to save the output stream again to a pbf. If you can share some code perhaps I could comment some more but it's difficult to make out from your explainer.
I myself don't use this code anywhere in a production system at the moment so I can't really claim it's been really field-tested yet so as with any open-source project it's provided as-is, no guarantees.
Thanks so much. And I totally understand there are no guarantees and it is as-is 💯 .
Here's what I'm trying:
var thePast = DateTime.Now.AddHours(-2).AddDays(-5);
var catchupEnumerator = new CatchupReplicationDiffEnumerator(thePast);
using (var fileStream = new FileInfo(Constants.PbfFile).OpenRead())
{
var source = new PBFOsmStreamSource(fileStream);
while (await catchupEnumerator.MoveNext())
{
var current = catchupEnumerator.State;
var diff = await catchupEnumerator.Diff();
// do something with the diff here!
source.ApplyChanges(diff);
}
}
I'm opening the filestream, getting the source, downloading the diffs, and trying to applychanges. It's possible I'm being too simple with this and I need to loop through and write all nodes, ways, and relations individually. Would love to help contribute anything I learn. Just not sure if I'm on the right track or not.
Again, really appreciate this code and what you've done.
I've been trying to get this to work for a few days. Using the Nuget package of OSM.Replication seems to always come back with no config (but the actual code and functional tests seem to work great). My big question is how do I apply the diffs? I was using the ApplyChanges function, but can't see the datemodified of the pbf file change-- so no idea if that's actually happening. An example code snippet would be great. Thank you.
The text was updated successfully, but these errors were encountered: