Tool to convert open location codes to GPS coordinates on a map. Open Location is a geocoding system created by Google (sometimes renamed 'plus codes') and displayed, among others, on Google Maps.

Open Location (Plus Code) - dCode

Tag(s) : Geography

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

Tool to convert open location codes to GPS coordinates on a map. Open Location is a geocoding system created by Google (sometimes renamed 'plus codes') and displayed, among others, on Google Maps.

**Open Location** codes are a geocoding system locating a geographic area on Earth in the manner of GPS coordinates, but shorter thanks to an alphanumeric code.

The Earth is first divided into geographic areas of 18x9 (every 20 °) which can be identified by 2 coordinates (AA), then each area is divided into 20x20 sub-areas identified by the sub-coordinates ('BB ') etc, themselves redrawn in 20x20 up to 4 times.

Each pair of letters therefore represents an area, and the more pairs of letters, the more precise the area (up to an area of 3.5m on the most precise side)

A code is of the form AABBCCDD+EEF composed of 1 to 4 alphanumeric pairs, followed by the plus sign + and another alphanumeric pair, possibly followed by an additional character.

The 20 characters allowed are 23456789CFGHJMPQRVWX (similar to writing in base 20)

Separate the pairs of characters and for each, note the first character (latitude coordinate) and the second character (longitude coordinate) to locate in the grid.

To reconstruct GPS coordinates (latitude, longitude), it is first necessary to convert the characters 23456789CFGHJMPQRVWX according to the correspondence table:

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | C | F | G | H | J | M | P | Q | R | V | W | X |

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

Then for each value, multiply it by the precision of each couple according to the table

#1 AA | 20° |

#2 BB | 1° |

#3 CC | 0.05° |

#4 DD | 0.0025° |

#5 EE | 0.000125° |

#6 F | 0.00003125° |

Add all latitude values and subtract 90 ° on one side and all longitude values and subtract 180° on the other to obtain GPS coordinates.

__Example:__ The code 8FW4V75R+8W is cut into pairs 8F,W4,V7,5R,8W, the first pair 8F consists of lattitude $ 8_{(20 OLC)} = 6_{(10)} = 6 \ times 20 ° = 120 ° $ and longitude $ F_{(20 OLC)} = 9_{(10)}'= 9 \times 20° = 180° $, the second pair is' W4' either latitude +18° and longitude +2° etc. The sums respect give the latitude $ \approx 138.8583 - 90 = 48.8583° $ and the longitude $ \approx 182.2923 - 180 = 2.2923 ° $

From GPS coordinates:

__Example:__ (lat, long) = 48.8583,2.2923

1- add 90° to the latitude and 180° to the longitude

__Example:__ $ 48.8583+90=138.8583 $, $ 2.2923+180=182.2923 $

2- multiply the values by 8000 (= 20 ^ 3)

__Example:__ $ 138.8583 \times 8000 = 1110866.4 $, $ 182.2923 \times 8000 = 1458338.4 $

3- convert the values obtained to base 20 (with the alphabet 23456789CFGHJMPQRVWX) by limiting yourself to the whole part and supplementing with initial zeros if the result has less than 5 digits.

__Example:__ $ 1110866_{(10)} = [6, 18, 17, 3, 6]_{(20)} = 8WV58_{(20 OLC)} $, $ 1458338_{(10)} = [9, 2, 5, 16, 18]_{(20)} = F47RW_{(20 OLC)} $

4- insert the $ 2 \ times 5 $ characters obtained by alternating latitude then longitude and write the result in the form 'XXXXXXXX + XX'

__Example:__ 8WV58 and F47RW give 8F,W4,V7,5R,8W or the *plus code* 8FW4V75R+8W

The **Open Location** (OLC) codes are in the format XXXXXXXX+XX or sometimes XXXX+XX Place (the first 4 characters are deleted) this second form requires a database in order to know the place which allows to find the 4 first characters.

Codes have a + hence their nickname * plus codes *

The Google company created these codes which are used more and more, thanks to Google Maps, any reference to the search engine is a clue.

dCode retains ownership of the source code of the script Open Location (Plus Code) online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be released for free. To download the online Open Location (Plus Code) script for offline use on PC, iPhone or Android, ask for price quote on contact page !

Please, check our community Discord for help requests!

open,location,plus,code,geocoding,google

Source : https://www.dcode.fr/open-location-code

© 2020 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲