Created
September 27, 2017 08:45
-
-
Save xivk/b2f8d636d47adc0c052f50bb9561625a to your computer and use it in GitHub Desktop.
Add way id's to an OsmSharp stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add way_id. | |
var eventsFilter = new OsmSharp.Streams.Filters.OsmStreamFilterDelegate(); | |
eventsFilter.MoveToNextEvent += (OsmSharp.OsmGeo osmGeo, object param) => | |
{ | |
if (osmGeo.Type == OsmSharp.OsmGeoType.Way) | |
{ | |
osmGeo.Tags.Add("way_id", osmGeo.Id.ToString()); | |
} | |
return osmGeo; | |
}; | |
eventsFilter.RegisterSource(progress); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment