Actually, num.ToString("R", CultureInfo.InvariantCulture) seems to test better for compatibility with how other libraries handle rounding. I would like to request that.
Thank you for your interest in the Aspose.GIS product.
We have included this improvement request in our issue tracking system as GISNET-513. And we will update you here as soon as additional information is available.
The features you were looking for is available in Aspose.GIS for .NET 20.3. Aspose.GIS allows you to change the decimal precision in WKT String.
Please, consider the following code to handle rounding:
Point point = new Point(23.5732, 25.3421) { M = 40.3 };
point.SpatialReferenceSystem = SpatialReferenceSystem.Wgs84;
// to get max a decimal precision
Console.WriteLine("G17 : " + point.AsText(WktVariant.Iso, NumericFormat.General(17)));
Console.WriteLine("R : " + point.AsText(WktVariant.Iso, NumericFormat.RoundTrip));
// console:
// POINT M (23.5732 25.342099999999999 40.299999999999997)
// POINT M (23.5732 25.3421 40.3)
// to trim a decimal precision
Console.WriteLine("G3 : " + point.AsText(WktVariant.Iso, NumericFormat.General(3)));
Console.WriteLine("Flat3: " + point.AsText(WktVariant.Iso, NumericFormat.Flat(3)));
// console:
// POINT M (23.6 25.3 40.3)
// POINT M (23.573 25.342 40.3)