public function setDMS($string)
    {

        $string = preg_replace(
            "/[^a-zA-Z0-9,.\s]/",
            ' ',
            trim($string)
        );

        $string = str_replace(
            array('S', 'N', 'E', 'W'),
            array(' S', ' N', ' E', ' W'),
            strtoupper($string)
        );

        $string = preg_replace(
            '/\s+/',
            ' ',
            $string
        );

        $this->dms = explode(' ',$string);
    }