Free Support Forum -

Aspose.GIS transformation accuracy

we are going to use Aspose.GIS in our project, but for us very important transformation accuracy. We tried a few versions and have the next results:

(3399381.0, 6487595.0) v18.12.1
(3399381.0, 6520551.0) v20.3

transformation with qgis:

(3399381.19870062358677387 6520550.77000384032726288)

transformation with epsg:

(3399381.20, 6520550.77)

looks like you improve accuracy, but could we get transformation result without rounding to the nearest digit?

P.S. we transform (30.5371609, 50.4269714) from EPSG 4326 to EPSG 3857

Hi, @oleksiim

Thank you for sharing the issue report.

We have reproduced this problem (see below code) and created a ticket GISNET-534.

// Source and destination SRS
var fromSrs = SpatialReferenceSystem.Wgs84; // EPSG 4326
var toSrs = SpatialReferenceSystem.WebMercator;// EPSG 3857
var transformation = fromSrs.CreateTransformationTo(toSrs);

// Transform geometry
var fromGeometry = new Aspose.Gis.Geometries.Point(30.5371609, 50.4269714);
var toGeometry = transformation.Transform(fromGeometry);

// Print more digits
Console.WriteLine("Result: " + toGeometry.AsText(WktVariant.Iso, NumericFormat.General(17)));
// Result: POINT Z (3399381.2016602601 6520550.7637923947 0) 

Please let me know if you experience any other problems.

1 Like