Closed shankarpatali-stla closed 2 months ago
Original:
<Position>
<GeoPosition latitude="0.8416155582" longitude="0.2047521722"/>
</Position>
Exported:
<Position>
<GeoPosition latitude="0.841616" longitude="0.204752"/>
</Position>
Thank you for your ticket, and thank you for the example. Either, we could simply set up the precision to a higher constant value (e.g. 10). But this solution is not generic. In a more generic way we have to store the precision that comes with a document that was read in and keep the precision for every single double value wen exporting it.
We will investigate the bug as soon as we can. We are planning a bugfix release for October.
fixed
Describe the bug While converting double values to string using XmlExportHelper::ToXmlStringFromDouble the precision is lost. This creates problems like position values being not correctly exported.
Hint: This might have been caused by std::to_string. It uses default precision of 6.
To Reproduce Steps to reproduce the behavior:
tinyxml2::XMLPrinter printer; xml_document->RootElement()->Accept(&printer); std::cout << printer.CStr() << std::endl;
Expected behavior Precision of double values are not lost
Screenshots None
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.