Open alecava58 opened 7 years ago
This is why Itinero does 2 passes over the OSM-data. This is what happens in each pass:
This is the only way to get all the node coordinates. Itinero already does so you should be able to reuse the way I have done this.... have a look at the code processing the OSM data in Itinero.
Looking at IDP I'd need to add a custom tag if the nodes referenced by a way is inside an area. My idea was to create a filter like AddWayId but I don't know how to get the coordinates of the nodes contained in the Nodes collection of the Way.
Could you help me doing this. Thanks
static OsmSharp.OsmGeo EventsFilter_AddWayId(OsmSharp.OsmGeo osmGeo, object param) { if (osmGeo.Type == OsmSharp.OsmGeoType.Way) { var w = (OsmSharp.Way)osmGeo; foreach(var node in w.Nodes) { //var lat = ?? how to get latitude of node } osmGeo.Tags.Add("way_id", osmGeo.Id.ToString()); } return osmGeo; }