Hi guys, I'm stuck with another coordinates related query here. I have a number of CSV files and they all have a bunch of coordinates mentioned however the coordinates are in differing formats like some files have the coordinates shown as so:
40.0873°N 20.1531°E
While some have them as so:
27°50′21″N 00°11′07″W
I need a way to set up a function in PHP that:
First of all deduces what format the coordinates are in
Then convert the coordinates into latitude and longitudes as so:
37.235
-115.811111
Plus I understand the second format is Hours Minutes Seconds - the thing is that how do I extract the hours minutes and seconds from this kind of string.
Any help would be greatly appreciated...