EPSG:9640 DEPRECATED

Degree representation conversion: DM to DMSH

Attributes

Data source: EPSG

Information source: EPSG guidance note #7.

Revision date: 2002-11-22

Remarks: Applies to 2D and the horizontal component of 3D ellipsoidal systems.

Formula

In the formulas that follow, the coordinate strings are symbolically represented as follows:

deg                     decimal degrees
adeg                   absolute value of decimal degrees
ideg                     integer degrees
sdeg                   signed integer degree
min                      real-number minutes
imin                      integer minutes
sec                      real-number seconds
lathem, lonhem    hemisphere abbreviation

Forward calculation from DM representation to DMSH representation:

ideg = ABS(sdeg)

imin = INT(min)
sec = (min - imin) * 60

If lat_sdeg < 0, lathem = S else lathem = N
If lon_sdeg < 0, lonhem = W else lathem = E

Reverse calculation from DMSH representation to DM representation:
sdeg = ideg * H
where for latitude, H = 1 if lathem = N and H = -1 if lathem = S
and for longitude  H = 1 if lonhem = E and H = -1 if lonhem = W

Then
min = imin + (sec / 60)

Example

Source CRS = WGS 84 (DM) (CRS code 63266408).
Latitude = 35°45.153’, longitude = -85°12.249’

Target CRS in DMSH = WGS 84 (CRS code 4326)
Latitude = 35°45’09.18"N, longitude =  85°12’14.94"W
MapTiler banner