Convert to WGS84

Use the Aspose.GIS for .NET library to transform from any spatial reference system to WGS84.

Live Example

Aspose.GIS for .NET presents you online free the “Convert to WGS84” application, where you may try to investigate the functionality and quality it works.

transformation coordinates app

Code sample - Convert to WGS84

The following code snippet shows you how to convert to WGS84 for a point.

// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET
// create transformation
int epsgFrom = 4326; // Any
int epsgTo = 4326; // lat long
var fromSrs = SpatialReferenceSystem.CreateFromEpsg(epsgFrom);
var toSrs = SpatialReferenceSystem.CreateFromEpsg(epsgTo);
var transformation = fromSrs.CreateTransformationTo(toSrs);
// transform geometry such as a point
var fromGeometry = new Point(0, 0);
var toGeometry = transformation.Transform(fromGeometry);
// print
Console.WriteLine(toGeometry.GetCentroid().AsText());
Console.WriteLine(toGeometry.AsText());