1

If I have a location in the following format:

N51 46.981 W1 36.145

Is there an easy way to convert this to latitude / longitude? It doesn't really matter what it's written in as I need to run a script to convert a fair few of these. Ideally I would do it in a Excel / Numbers spreadsheet. My attempts recently came from using the MID command in Excel to grab the data into the following:

51:46:981
01:36:145

And then multiply them by 24 to get a latitude or longitude value. I'm fairly confident that this is incorrect as it seemed to lose accuracy. Is there an easier way of doing this?

Using google maps and searching for the first value above I get the result:

51.783017, -1.602417

This is essentially what I am looking for.

4

1 回答 1

2

The formula for the first one for example is 51.783017 = 51 + 46.981/60.

Including the numbers extraction from the original string, the corresponding formulae in Excel could look like this (I am not using mid as the number of digits are not known: the degrees could be 1 to 3 figures for example):

enter image description here

And the results are:

enter image description here

于 2012-06-22T10:17:33.753 回答