The latitude and longitude values are represented in Degree, Minutes and Seconds (Sexagesimal numeral system). The various GIS software requires the values of the points in terms of degree decimals instead of DMS. The data points collected from field (by a GPS device) may be in Degree Minutes and Seconds. Both the formats have their own utility \u2014 the DMS format is useful for presentation and degree decimal format is more suited for calculation purpose. GIS users very often struggle with the problem of converting the points of interests (POIs) between these two formats.
DMS to Degree Decimal
Following formula can be used to convert DMS to degree decimal values. It can be easily implemented using Visual Basic, C or Java to process large number of POIs. This formula can also be used in MS EXCEL for converting the list of POIs.
Degree Decimal to DMS
The conversion from Degree decimal to degrees, minutes and seconds is not that straight. To convert the decimal degree values use following steps:
Thus the decimal degree 45.3470 will be 45\u00b0 20\u2032 49\u2033
Doing it in Excel
Now we can put the above mentioned formulae in MS EXCEL to convert the long list of POIs collected from field.
DMS to Decimal Degrees
Suppose that the values of latitude degrees, minutes and seconds are written in three different columns A, B and C and Longitude degrees, minutes and seconds are written in three different columns D, E and F. Follow the underlying steps:
=A2+(B2/60)+(C2/3600) and press enter.
Decimal Degrees to DMS
Suppose that the values of latitude and longitudes are in column A and B in degree decimal format. To convert degree decimal to DMS follow the given steps:
=INT(A2) to get the value of latitude degree.
=INT((A2-C2)*60) to get the value of latitude minutes.
=ROUND((((A2-C2)*60)-INT((A2-C2)*60))*60,0) to get the value of latitude in seconds.
Advanced: DMS String Conversion
The values of Latitude and Longitude are generally written in degrees, minutes and seconds format with symbols (e.g. 76\u00b006\u201957.6\u201dE). If a list of such values is to be converted to degree decimal format for GIS software, the above method will not work since the Excel data has a DMS string in a single cell of data type \u201ctext\u201d.
The following formula converts a DMS string (76\u00b006\u201957.6\u201d) to degree decimal (76.116):
The reverse \u2014 degree decimal to DMS string (76.116 to 76\u00b006\u201957.6\u201d) \u2014 can be done using:
Copy paste the above formula (including = sign) in cell D2 and then copy paste from cell D2 to cell E2 to convert the values of DMS strings in cell B2 and C2 into degree decimal values.