I have a dictionary from where I could print out the data['longitude'] and data['latitude'] like this.
(91°38'28.2"E)(22°40'34.3"N)
(92°04´14.1´´E)(21°37´00.8´´N)
(E-092° 15. 715')(N-20° 56.062')
(91°49'10.63"E)(24°20'05.40"N)
(91°26'31.92"E)(24°07'35.15"N)
(90°08'15.07"E)(24°41'14.71"N)
(90°04'7.97"E)(24°42'29.34"N)
(90°04'10.06"E)(24°42'32.8"N)
(E-092° 15.776')(N-20° 56.065')
(91°46'26.90"E)(24°18'47.16"N)
(E-092° 15.649')(N-20° 56.023')
(91°46'26.90"E)(24°18'47.16"N)
(91°49'08.08"E)(24°20'06.33"N)
(92° 2'31.25"E)(21°20'58.79"N)
(E-092° 15.776')(N-20° 56.065')
(E-092° 15. 486')(N-20° 56.022')
I am to convert these number to decimal degrees. For example,
92° 2'31.25"E -> (92 + (2/60) + (31.25/3600)) -> 92.042
20° 56.023' -> 20 + (56.023/60) -> 20.993
Typical python character split couldn't work because the numbers have inconsistent patterns.
(data['longitude'][:3]) + (data['longitude'][5:2]/60) + (data['longitude'][8:5]/3600)
I used this thread to extract these values from a docx file. Now I am stuck again.
(N-(.{,12})([0-9]|\')|[0-9].{,12}N)[;, ]+(E-(.{,12})([0-9]|\')|[0-9].{,12}E). It needs to either search by 90-92 and 20-24 degree range first, or search the minute and seconds then come to degrees.