Convert Degrees to Minutes Seconds in C#

Latitude and longitude values are used to specify any location on the earth. Whereas, the Degrees Minutes Seconds is another format for geographical coordinates. In some scenarios, you may need to convert some decimal degrees to degrees minutes seconds format. Following such requirements, this article covers how to convert Decimal Degrees to Degree Minutes and Seconds programmatically in C#.

Decimal Degrees to Degrees Minutes Seconds DMS Converter API - Installation

Aspose.GIS for .NET API supports creating or manipulating different file formats related to GIS applications like ArcGIS, QGIS, etc. You can easily install it in your environment either by downloading its DLL files from the New Releases page or installing it with the NuGet installation command below:

PM> Install-Package Aspose.GIS

Convert Decimal Degrees to Degrees Minutes in C#

You need to follow the steps below to convert decimal degrees to degree minutes programmatically in C#:

  1. First of all, specify the longitude and latitude values.
  2. Convert the decimal degrees to degrees minutes.
  3. Print the converted values on the console.

The following code snippet shows how to convert decimal degrees to degrees minutes programmatically in C#.

Convert Decimal Degrees to Degrees Minutes Seconds in C#

You can convert decimal degrees to degrees minutes seconds with the following steps:

  1. Firstly, specify the input values for longitude and latitude.
  2. Convert the decimal degrees to degrees minutes seconds.
  3. Print the output values on the console.

The sample code below explains how to convert decimal degrees to degrees minutes seconds programmatically in C#.

Get Free License

You can evaluate the API without any limitations by requesting a free temporary license.

Conclusion

In this article, you have understood how to convert decimal degrees to degrees minutes seconds format programmatically in C#. Simply convert the longitude and latitude values to DMS format in .NET applications. Furthermore, you can visit the documentation section to explore many other features included in the API. In case of any concerns, please reach out to us at forum.

See Also