20i
Plus Codes

So today I learned about Plus Codes

Eh?

So while browsing Google maps today, I noticed that along with the regular street, town, region and country information for a given place there was a small but intriguing combination of letters and numbers (and a plus, obviously).

It was neatly tucked away in all the other details like it has always been there – but it hasn’t!

  1. ? What are Plus Codes?
  2. ? How do I use Plus Codes?
  3. ? What are they useful for?
  4. ? What next?

What are Plus Codes?

A quick Google later and I am on https://plus.codes/ – explaining to me that Plus Codes are a new way of encoding longitude and latitude data into a Plus Code and an area or area code (the area/area code is needed unless you’re within 25 kilometers of the location).

A Plus Code covers the area of a building (unless a high accuracy code is generated) up to 14×14 meter resolution. Adding one other character to the code provides resolution up to 3×3 meter. There’s not really that much to the codes, they’re just an area code and a local code.

I’d been looking for the exact location of Boris Brejcha’s DJ set in the grounds of Château de Fontainebleau, France.

So, the reason I found them useful is because they can describe the location of the YouTube video (and my desk in the 20i office) much more precisely than the official addresses:

20i office4VJ5+JG Mansfield, UK
YouTube videoCM2X+RH Fontainebleau, France

How do I use Plus Codes?

To get started with them, you don’t need to do much!

Choose your favorite language from those available – then find the longitude and latitude of a location and get encoding. Or get the Plus Code of a location and get decoding!

Encoding

I decided to generate a code for the castle using the coordinates from Google Maps. I used the raw source from Google’s GitHub, pasted it into my Chrome console, and used https://github.com/google/open-location-code/tree/master/js to find out what to do:

<= OpenLocationCode.encode(48.402096, 2.698874, OpenLocationCode.CODE_PRECISION_NORMAL)

=> "8FW4CM2X+RG"

Worked first time, so now it’s time to decode!

Decoding

Continuing their documentation I tried to decode my first encoded code:

<= OpenLocationCode.decode("8FW4CM2X+RG")

=> Object {
codeLength: 10
latitudeCenter: 48.402062500000014
latitudeHi: 48.40212500000001
latitudeLo: 48.402000000000015
longitudeCenter: 2.6988125000000167
longitudeHi: 2.6988750000000152
longitudeLo: 2.698750000000018
}

Also worked first time! There’s my original input data right there (give or take a few points difference).

What are they useful for?

They’re great for finding the location of a place that doesn’t have a perfect street address: the 20i office isn’t directly at the pin for our official postal address in Google Maps, but it is if you use the Plus Code.

It is the same case for the location of Boris Brejcha’s DJ set inside the gardens at the castle: each place’s exact location given in a small handy code – awesome!

According to the World Bank, half of the world’s population live on ‘unnamed streets’. So for those people, Plus Codes are a way for them to have a recorded address – to receive deliveries and access services. They can even be used by emergency services or disaster relief in remote locations.

What next?

Well, that’s up to you I guess! Do you own a paintball center whose location is difficult to describe? Do you own an oil company whose pumps’ locations are also difficult describe? You see what I’m getting at.

Find out more – https://plus.codes/

That’s it from me – just thought I’d share some of my random findings from my Sunday Internet Travels.

I know that isn’t exciting as it sounds. :\

I did also learn the pros and cons of AC vs DC power. But that won’t find its way into a 20i blog.

Image Credit: Google

4 comments

  • Thanks. Very helpful. But I can’t figure out how to get the more precise PlusCode designator for a place. Google maps always gives a xxxx+xx PlusCode designator. To get a more precise location, I need a designator with more numbers and letters (xxxxxx+xxx), but I don’t know how to find one. H.E. Jones

  • Thanks for the Plus Codes info. I don’t have a website but am interested in people who just find out information! Well done!

rh20i

Ricky Hayes is a Platform Developer at 20i.