Plus codes as an easy location-sharing option

You may know of grid squares for general location in a ham radio contest, or the What3Words system with its easy access if you have network access, but there is another often-used location project you may not have heard of which is also easier than sharing a long latitude and longitude number!

Check out the details on where you can learn more, choose Find your code, and choose a location. Although this is a project of Google, it is open source and usable in your application using the code here.

The usage of this can be offline with one of their code examples – for example, 98GQ2R4H+4Q would be off of Greenland. Unlike lat/lon coordinates, an incomplete or wrong coordinate here would not validate or be nowhere near expected, allowing you to know that a transmitted coordinate is wrong right away.

If you download the file openlocationcode into your project, you can import it with a Python file in the same directory and use it as such:

import openlocationcode
loc = openlocationcode.decode('98GQ2R4H+4Q')
print(loc.latitudeCenter, loc.longitudeCenter);

Getting the result back

60.00531249999999 -44.1705625

Leave a Reply

Your email address will not be published. Required fields are marked *

fifty eight − = 48