title: Transform geographic coordinates into decimal values
body: <p>I have a csv-file holding geographic names together with geographic coordinates. Here's an example:</p>
  
  <pre><code>"Afghanistan","33 00 N","65 00 E"
  "Akrotiri","34 37 N","32 58 E"
  "Albania","41 00 N","20 00 E"
  "Algeria","28 00 N","3 00 E"
  "American Samoa","14 20 S","170 00 W"
  "Andorra","42 30 N","1 30 E"
  "Angola","12 30 S","18 30 E"
  "Korea, North","40 00 N","127 00 E"
  "Korea, South","37 00 N","127 30 E"
  </code></pre>
  
  <p>Dissecting the first row we have the name (Afghanistan), the latitude (33°00'N) and the longitude (65°00'E). The result I'm looking for is the following:</p>
  
  <pre><code>"Afghanistan","33","65"
  "Akrotiri","34.62","32.97"
  "Albania","41","20"
  "Algeria","28","3"
  "American Samoa","-14.34","-170"
  "Andorra","42.5","1.5"
  "Angola","-12.5","18.5"
  "Korea, North","40","127"
  "Korea, South","37","127.5"
  </code></pre>
  
  <p>It's simply carrying over the full degrees, adding the minutes as decimals (divide by 60 and round) and using the character to decide wether the resulting value is positive (N, E) or negative (S, W). </p>
  
  <ul>
  <li>Degrees latitude range from 0-90,  </li>
  <li>degrees longitude range from 0-180 and the</li>
  <li>minutes in both cases range from 0-59</li>
  </ul>
  
  <p>I tried my very limited set of regex knowledge on it but failed miserably. I did not even come close to something useful. </p>
  
  <p>That's why I'm turning to you regex-gurus to please share some of your vast knowledge with me.</p>
  
  <p>Thank you</p>