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
Read the resulting data with OsmSharp, and use the DefaultFeatureInterpreter to interpret the way.
An exception "Attribute id already exists!" will throws.
System.ArgumentException: Attribute id already exists!
at NetTopologySuite.Features.AttributesTable.Add(String attributeName, Object attributeValue)
at OsmSharp.Geo.DefaultFeatureInterpreter.TagsAndIdToAttributes(ICompleteOsmGeo osmObject)
at OsmSharp.Geo.DefaultFeatureInterpreter.Interpret(ICompleteOsmGeo osmObject)
at OsmSharp.Geo.FeatureInterpreter.Interpret(OsmGeo osmGeo, ISnapshotDb data)
I dont known the best way to handle this case.
I think the best option it to ignore the id tag from the way, and only keep the way id to be backward compatible. The id tag might be shifted to an other name, to be still accessible.
An other option would be to change how the id is transformed to tag with a reserved name that would not collide such as $id but this will broke all existing users of DefaultFeatureInterpreter.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
Extract OSM data that contains way 4745698 (many other ways have the same issue, it's just an example):
Read the resulting data with OsmSharp, and use the DefaultFeatureInterpreter to interpret the way.
An exception "Attribute id already exists!" will throws.
I dont known the best way to handle this case.
$id
but this will broke all existing users ofDefaultFeatureInterpreter
.The text was updated successfully, but these errors were encountered: