import re
import warnings


def string_to_dms(coord):
    """Converts well formed coordinate string to its components.
    Example: 41°24'12.2" -> (41, 24, 12.2)

    :param str coord: coordinate string formatted as <DD°MM'SS.S[E|N]>
    :rtype: (int, int, float)
    """
    match = re.match(r"^\d{1,2}°\d{1,2}\'\d{1,2}(\.\d+)?\"[EN]?$", coord)
    if not match:
        warnings.warn("Argument value <{}> does not match pattern <DD°MM'SS.S\">".format(coord))
        return
    components = re.split(r"[°'\"]+", match.string)
    return int(components[0]), int(components[1]), float(components[2])