diff --git a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp index 1797a2e1046f32a709db0e61ff8c9f6ba42eca41..c093eb6171e31afc77a50286ae93fed0ffefa39d 100644 --- a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp @@ -263,6 +263,7 @@ bool BoostXmlGmlInterface::write() addSurfacesToPropertyTree(geometry_set); boost::property_tree::xml_writer_settings<std::string> settings('\t', 1); + setPrecision(std::numeric_limits<double>::digits10); write_xml(_out, pt, settings); return true; } diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index 78c370524c3ce52a98b89412021b6feb81bb1808..a20df36ad9b87815fd000c6fb3c467f2c300a866 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -288,9 +288,18 @@ bool XmlGmlInterface::write() { QDomElement pointTag = doc.createElement("point"); pointTag.setAttribute("id", QString::number(i)); - pointTag.setAttribute("x", QString::number((*(*points)[i])[0], 'f')); - pointTag.setAttribute("y", QString::number((*(*points)[i])[1], 'f')); - pointTag.setAttribute("z", QString::number((*(*points)[i])[2], 'f')); + pointTag.setAttribute( + "x", + QString::number((*(*points)[i])[0], 'g', + std::numeric_limits<double>::digits10)); + pointTag.setAttribute( + "y", + QString::number((*(*points)[i])[1], 'g', + std::numeric_limits<double>::digits10)); + pointTag.setAttribute( + "z", + QString::number((*(*points)[i])[2], 'g', + std::numeric_limits<double>::digits10)); std::string const& point_name(pnt_vec->getItemNameByID(i)); if (!point_name.empty())