LAT LONG to UTM
Contents
[
Hide
]
Use the Aspose.GIS for .NET library to transform LAT LONG to UTM.
Live Example
Aspose.GIS for .NET presents you online free the “LAT LONG to UTM” application, where you may try to investigate the functionality and quality it works.
Code sample - Convert LAT LONG to UTM
The following code snippet shows you how to convert LAT LONG to UTM for a point.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
// create transformation | |
int epsgFrom = 4326; // LAT LONG | |
int epsgTo = 32631; // UTM | |
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); | |
Console.WriteLine(toGeometry.GetCentroid().AsText()); | |
Console.WriteLine(toGeometry.AsText()); |