private bool ConcurrentMoveNext(OsmStreamSource source, out OsmGeo current, bool ignore_nodes = false, bool igonre_ways = false, bool ignore_relations = false) { bool available = false; current = null; lock (_source_lock) { if (_cancel_pull) { return(false); } available = source.MoveNext(); if (available) { current = source.Current(); _pull_progress++; } } return(available); }
private void StreamSourceToTargetThread(OsmStreamSource source, OsmStreamTarget target) { var concurrent_target = target.ConcurrentCopy(); concurrent_target.Initialize(); OsmGeo current; while (ConcurrentMoveNext(source, out current)) { concurrent_target.Add(current); } concurrent_target.Flush(); concurrent_target.Close(); }
public virtual void RegisterSource(IEnumerable <OsmGeo> source) { this._source = source.ToOsmStreamSource(); }
public virtual void RegisterSource(OsmStreamSource source) { this._source = source; }
/// <summary> /// Registers a reader on this writer. /// </summary> /// <param name="source"></param> public void RegisterSource(OsmStreamSource source) { _source = source; }