When converting IGeometry
to WKT with the AsText()
method, decimal precision is lost as compared to other libraries (SqlGeometry, DotSpatial).
For example:
-108.45392758962691
becomes:
-108.453927589627
This is because internally your code is generating number strings for WKT via:
stringBuilder.Append(num.ToString(CultureInfo.InvariantCulture));
What it should be is:
stringBuilder.Append(num.ToString("G17", CultureInfo.InvariantCulture));