Replacing ',' with '.' when parsing double.

This commit is contained in:
Filip Strajnar 2024-06-24 11:07:49 +02:00
parent e306b23663
commit 24d1b8f3dd

View file

@ -25,7 +25,7 @@ namespace OsmToDatabase.Common
public static double? TagDoubleValueByKey(this Node node, string tagKey)
{
string? tagValue = node.TagValueByKey(tagKey);
string? tagValue = node.TagValueByKey(tagKey)?.Replace(",", ".");
bool success = double.TryParse(tagValue, out double result);
return success ? result : null;
}