public static function dmsToDecimal(int $deg, int $min, float $sec, string $hemisphere): float
    {
        $multiplier = ('S' === $hemisphere || 'W' === $hemisphere) ? -1 : 1;

        return $multiplier * ($deg + ($min / 60) + ($sec / 3600));
    }
public static function dmsToDecimal(int $deg, int $min, float $sec, string $hemisphere): float
    {
        $multiplier = ('S' === $hemisphere || 'W' === $hemisphere) ? -1 : 1;

        return $multiplier * ($deg + ($min / 60) + ($sec / 3600));
    }
public static function dmsToDecimal ( int $ deg , int $ min , float $ sec , string $ hemisphere ) : float { $ multiplier = ( 'S' === $ hemisphere || 'W' === $ hemisphere ) ? - 1 : 1 ; return $ multiplier * ( $ deg + ( $ min / 60 ) + ( $ sec / 3600 ) ) ; }
Transform a DMS string to a decimal representation. Used for LOC records.

@param int    $deg        Degrees
@param int    $min        Minutes
@param float  $sec        Seconds
@param string $hemisphere Either 'N', 'S', 'E', or 'W'

@return float
Transform a DMS string to a decimal representation . Used for LOC records .