GetWays in OsmSourceData
OsmSharp - OpenStreetMap (OSM) Library and Tools developed in C#
Brought to you by:
xivk
I am interest in GetWays function in OsmDataSource class, but "GetWays" very strange.
Input is "IList<long> ids", but just use its count to return a list of way.
So I suggest make a GetWays Function like this.
public IList<Way> GetWays()
{
return this._ways.Values.ToList();
}
it can return a "way" list, user just need use "foreach" to get each "way".
Thanks for the suggestion; I update the OsmDataSource like this:
/// <summary>
/// Returns all the ways in this datasource.
/// </summary>
/// <returns></returns>
public IEnumerable<Way> GetWays()
{
return this._ways.Values;
}
Now you can use a foreach to loop over all ways (the ToList() creates an entirely new list in-memory).
Future: Implement this also on the IDataSource interface and all datasource classes.