mirror of
https://onedev.fprog.nl/OsmToDatabase
synced 2025-12-20 22:48:37 +01:00
Replacing ',' with '.' when parsing double.
This commit is contained in:
parent
e306b23663
commit
24d1b8f3dd
|
|
@ -25,7 +25,7 @@ namespace OsmToDatabase.Common
|
||||||
|
|
||||||
public static double? TagDoubleValueByKey(this Node node, string tagKey)
|
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);
|
bool success = double.TryParse(tagValue, out double result);
|
||||||
return success ? result : null;
|
return success ? result : null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue