
Open Location Code - FriedPickles
https://github.com/google/open-location-code
======
nabla9
Reinventing the wheel without any clear advantage.

Plus codes don't seem to have any advantage over widely used MGRS (Military
Grid Reference System).
[https://en.wikipedia.org/wiki/Military_Grid_Reference_System](https://en.wikipedia.org/wiki/Military_Grid_Reference_System)

~~~
chronial
I find them a lot more human-friendly, but I guess that's subjective. The
example from the wiki page you linked:

MGRS: 4QFJ12345678

Plus Code: 835M+Q7 Honolulu

~~~
arghwhat
That's only a partial plus-code, though, which relies on external positioning
of Honolulu. The full plus-code is 4 digits longer, and with the plus itself,
it's 11 chars vs. 12 for MGRS at 10m precision (14 for 1m, which is more than
plus-codes can do).

If MGRS was too long, it could simply get a new encoding and be done with, or
add the abbreviation system.

Also, that particular plus-code you used as example is not recommended.
Reference points should be small features that will have low geocoding
variance. Larger points like cities, or here whole islands, as there can be
very large variance to the exact location derived from the name (i.e. the
pinpoint location Google Maps finds you when you just search for Honolulu).

From the README:

> Rather than a large city size feature to generate the reference location, it
> is better to use smaller, neighbourhood features, that will not have as much
> variation in their geocode results.

~~~
chronial
> That's only a partial plus-code, though, which relies on external
> positioning of Honolulu.

Yes, a concept that is very human-friendly.

> Also, that particular plus-code you used as example is not recommended.
> Reference points should be small features that will have low geocoding
> variance. Larger points like cities, or here whole islands, as there can be
> very large variance to the exact location derived from the name (i.e. the
> pinpoint location Google Maps finds you when you just search for Honolulu).

You should take that up with the google devs I guess. The code I gave was
generated by google maps.

~~~
arghwhat
> Yes, a concept that is very human-friendly.

It's also entirely broken, rendering the system unusable if you expect sub-
kilometer positioning across different geocoding providers.

Whether something entirely defective is "human friendly" doesn't really
matter.

> You should take that up with the google devs I guess. The code I gave was
> generated by google maps.

Not my responsibility. That they cannot even use it correctly as per their own
docs themselves doesn't make for a good sales pitch. In fact, Google Maps
cannot process plus codes using arbitrary reference locations, making use per
the plus-code documentation impossible with it.

To give an idea of why that plus code is borked:

Honolulu @ Google Maps: 21.3069444,-157.8583333

Honolulu @ Bing Maps: 21.30493,-157.85788

The difference is around 300 meters, which results in an absolutely awful
error margin, and I'd argue that this is very much one of the best-case
scenarios. That's worse than if they had added 2 more characters to the plus
code, and just removed the Honolulu part.

~~~
chronial
I think you misunderstood the way these reference locations work. Both google
maps and bing will resolve the given plus code to the exact same location – a
margin of error of 0cm.

It's only important that the reference point doesn't leave the 40km square
that it's supposed to be in. Google Maps might actually have a smarter
implementation than the docs suggest. If the whole city is in the relevant
40km square, using it as a reference point is fine.

~~~
londons_explore
It would be nice for the code to have some kind of 'check digit', so that the
code cannot resolve if the geocoding returns the wrong square, or if any
letters are off-by-one or transposed.

Check digits don't work well with truncatable codes though :-(

~~~
jacobush
Why not? Every letter could be a check digit. The drawback is that the same
location will have many possible location codes, of course.

~~~
kiriakasis
no, having check digits means that some code corresponds to no location and
are syntactically wrong.

~~~
jacobush
I realize now I meant some kind of error correcting code, combination. Like
this:

1

1 can be followed by either odd numbers or even numbers. If followed by an
even number, the next number must be odd.

127

Now if you truncate that to 12, crucially 12 has the same meaning as 11. 1 and
2 to have the same symbol meaning, but are using "sign" to hint at the next
number.

This will greatly reduce the chance that a random number will pass for a
position. This can be made more elaborate, with more or less advanced
encodings. The problem is of course that you waste bits on redundancy and so
addresses everything else being equal, will have more characters in them.

~~~
arghwhat
A much less expensive and much more normal solution would simply be to put a
single CRC digit at the end.

Systems such as what you describe are too complex and non-standard.

~~~
jacobush
But then you can not truncate the location.

~~~
arghwhat
I'd argue that this would never be done by hand anyway. The average user will
not understand the encoding, and I doubt many will think "Hmm, I have this
plus code, but I'd like to only have 1/20th of the precision."

Programmatic truncation would still be very easy, as it would just require a
new checksum to be calculated post-truncation.

------
numair
I’m not so sure 6GCRPR6C+24 is a great replacement for an address, but maybe I
just don’t know.

Although I could memorize my own address, I’d have a hard time memorizing my
friends’ addresses. Yes, nobody knows each other’s phone numbers anymore, but
those were a very temporary relic from a very short span of time (the
telephone era). Humans have always known each other’s addresses, and have
always spent a lot of time telling each other their locations in the form of a
spoken address.

On a more technical note, I am guessing this works super-well for auto-
completion, but didn’t see any example of that in the README...

All of the various geonaming systems seem very Esperanto at the moment. I
think we (as in all of us, the global community) could build upon Google’s
effort to come up with a much more human-friendly system to provide easy
global addressing. Yes, the address format system is way too localized and
breaks down at both scale and small distances; whatever that code was at the
beginning of my post (I’ve already forgotten it, and I’m too lazy to re-paste
it) is just not nearly as easy to remember as “100 Ocean Drive” or whatever. I
also have no clue how I might represent the building next door.

~~~
topher515
There's a feature that vastly improves the human usability for Plus Codes. The
least-precision, first-four characters can be omitted and replaced with the
City / Region name: e.g., "Nairobi PR6C+24". Considering that uniquely
identifies just a few square meters of space on Earth that seems pretty good.

~~~
askvictor
Does Melbourne resolve to Melbourne, Australia, or Melbourne, Florida?

~~~
jarofgreen
Surely the point of truncated codes is that you would only use them in a
context where things like this were already clear?

------
paulvs
A shoutout to Rober Dam who built Xaddress, "Give 7 billion people an instant
physical address": [http://xaddress.org/](http://xaddress.org/)

------
nmca
Have people here heard of "what3words"? It's a similar encoding scheme that is
much more human-memorable (for English speakers, at least).

The same spot, to +-1.5m is universe.renovated.upon as opposed to 6GCRPR6C+24

~~~
AndrewDucker
Proprietary. Charges for business use.

------
sn41
I have asked this question to a member of the Google maps team, and have not
gotten a precise answer. Is there some scheme which can distinguish between
floors of a building? This is very useful, for example, store locations inside
malls. The LatLong scheme does not seem to be enough. I'm guessing that it
will have to be 3D, but I have never heard of a standard location scheme which
incorporates this information.

~~~
fredley
What's wrong with just using floor names, e.g. "First floor"?

~~~
5555624
Who determines what is the "first floor"? Last week I had a medical
appointment. The doctor's office was on the 6th floor; but, it was 7th floor
counting up, as the building's ground floor is the "Lobby."

~~~
vinay427
This is normal in many countries but it's extremely uncommon in theUS, where
as you implied the ground floor is typically the "first" (in the numerical
sense) floor.

------
vonuebelgarten
So, did they just reinvent the Maidenhead locator (
[https://en.wikipedia.org/wiki/Maidenhead_Locator_System](https://en.wikipedia.org/wiki/Maidenhead_Locator_System)
) or any of the previous systems?

~~~
nmca
There's a pretty solid evaluation of the new system in terms of the old ones
at: [https://github.com/google/open-location-
code/wiki/Evaluation...](https://github.com/google/open-location-
code/wiki/Evaluation-of-Location-Encoding-Systems)

Indeed maidenhead seems to be the strongest of the previous approaches, they
rejected it because it can include words.

------
Syzygies
"Codes that are similar are located closer together than codes that are
different."

I dug hoping to find out how they handle boundary effects, and gave up.

The numbers 0.999999 and 1.000000 are far apart in Hamming distance but close
in position. What bounds are achievable for the maximum Hamming distance
between two nearby locations, in any such system? Do they approach the
theoretical limit here, or is "that are similar" a crock that only sometimes
holds?

For example, for a base 12 location code one could overlay a dodecahedron onto
the earth, then rotate it by a low-discrepancy sequence of quaternions for
successive digits. This would have very nice bounds for the maximum Hamming
distance between nearby locations, at the expensive of efficiency: each
successive digit subdivides the location by far less than a factor of 12. As
locations approach each other, vanishingly few rotations will distinguish
them.

One can imagine easy fixes for this scheme, but what is the theory? Do they
have a theory? Do they implement it?

------
code_scrapping
HAM radio locator grid does pretty much the same thing, with I would say
roughly the same precision.

example:
[http://k7fry.com/grid/?qth=JN17EB67UN](http://k7fry.com/grid/?qth=JN17EB67UN)

I only knew of the 6-character location code, which is typically used when
identifying yourself, but it seems there's the expanded version of up to 10
characters.

What I don't understand is the usage scenario. Plus codes are not human-
friendly like street addresses, so I'm assuming they're meant for machine
processing. But there you have all these other systems like HAM location codes
or MGRS, that I don't see added value.

------
bufferoverflow
Why wouldn't they use 36 (Letters+digits) to break it down in a 6x6 area
instead? Much more precise at the same length.

At 6 length, you're already down to the kilometer precision at the equator. At
9 length you're down to 4 meters.

And that's with a dumb grid division, which is very uneven on the globe, the
cube projection is probably a better way to deal with it.

~~~
tonyg
The larger the alphabet, the larger the risk of glyph confusion.

Here's the alphabet they chose:

    
    
      // The character set used to encode the values.
      var CODE_ALPHABET_ = '23456789CFGHJMPQRVWX';
    

It omits easily-confused glyphs like "0oOD", "1lLI" etc.

~~~
awirth
This is an interesting alphabet, even Base58 (Bitcoin addresses) have "o" and
"1".

There's some information on how they generated it here in the spec[1].

 _The characters that are used in Open Location Codes were chosen by computing
all possible 20 character combinations from 0-9A-Z and scoring them on how
well they spell 10,000 words from over 30 languages. This was to avoid, as far
as possible, Open Location Codes being generated that included recognisable
words. The selected 20 character set is made up of "23456789CFGHJMPQRVWX"._

[1]: [https://github.com/google/open-location-
code/blob/master/doc...](https://github.com/google/open-location-
code/blob/master/docs/olc_definition.adoc#open-location-code)

------
arnoooooo
For those wondering why they invented yet another grid coding system, here's
their justification : [https://github.com/google/open-location-
code/wiki/Evaluation...](https://github.com/google/open-location-
code/wiki/Evaluation-of-Location-Encoding-Systems)

The XKCD on competing standards comes to mind…

------
KboPAacDA3
Perhaps there's an underlying psychological advantage to using Plus Codes.
This past week I had to manually transfer coordinates of various locations
from one handheld google machine to another google machine. It was less
tedious to use the Plus Codes.

------
tiredwired
I want an address that a drone can use to drop a package on my 3rd floor
patio.

------
hasperdi
I remember that there is another project that is similar to this. They divided
the whole world in to grids and assign a code to each one.

~~~
Cthulhu_
Yeah, that's what3words ([https://what3words.com/](https://what3words.com/)),
which (IMO) makes for easier to remember words. It's available in multiple
languages too, for the non-english speaking world.

~~~
estsauver
I do work in rural Kenya, and the big problem what 3 words has is that the
words are totally randomly allocated around the world. A _REALLY_ important
attribute of addresses is that they can be vague.

"He's on High and 23rd", "I live on Monroe", "Near Jomo Kenyatta Airport",
etc.

The biggest mistake what 3 words made was not making the first two words be a
geocoding of the approximate area and the last word could provide additional
precision. It looks like google plus codes fixed this which is actually a huge
improvement.

~~~
sandGorgon
could you explain this a bit more ? not able to understand the implication of
this design flaw

~~~
estsauver
Knowing your neighbors address tells you nothing about your own address. To be
able to get your address, you need a smart phone, and at that point you could
just send me a pin with your exact latitude and longitude.

Approximate locations are dramatically more useful for navigating in much of
the rural developing world. "How do I get to village X" will have an answer
for 10 miles around. "How do I get to X lat/lng?" will be met with a shrug,
both from google maps which will suggest you drive through a field and from
anyone you ask.

If you can make something that works at the village level, you can bootstrap
people getting their location. If the first word provided approximately
"country" level information, the second provided approximately 1km bands (what
you get if you evenly divide the three little words partitions), and the third
gave you the 3m resolution grid, people without addresses could know their
approximate address from others.

Basically, there's a bootstrapping problem and a usefulness problem. Right
now, no one knows their 3 little words number. To become useful, most people
need to know their 3 little words. How do you cross that gap? One way would be
to have it be useful to know "2 words" or some approximate identifier for your
region and then after locating you approximately, your service provider can
tell you your last word.

~~~
thelittlenag
This is a general problem with solutions in the space. Part of the niceness of
say geohashes is that they telescope down.

The startup I'm involved with has developed what we call a geohash phrase. The
core idea is to map English (or whatever language) words to the characters of
a geohash. We usually map a word two-characters at a time, giving us 10-bits
of precision for each additional word. So your location might be something
like: "The big dog walks near the red house."

What is nice is that the phrase telescopes. So you can be vague when you want
and only provide say the first three words of your location.

------
Double_a_92
In my first naïve thought this seems trivial. "Just" map WGS84 coordinates to
a less clunky identifier. What am I missing?

~~~
ascorbic
Quite a bit, it seems. [https://github.com/google/open-location-
code/wiki/Evaluation...](https://github.com/google/open-location-
code/wiki/Evaluation-of-Location-Encoding-Systems)

~~~
Double_a_92
This is all I found about it:

> Cheap GPS devices have existed for at least 14 years [etrex], and yet
> latitude and longitude coordinates are still not widely used by people to
> specify locations. We think that this shows latitude and longitude have too
> many disadvantages to be adopted for a street addressing solution.

But still, isn't their solution just a "wrapper" around gps coordinates? How
is it different than encoding 2 decimal numbers into a short text identifier?

------
k_
I wish delivery services (mainly food delivery) would accept directions using
this, like "Appartment block entry at XXXX+XX with entry code YYYY, building
entry XXXX+XX with door code ZZZZ" (with code parsing somehow).

They keep getting things wrong for my location, but things like that (= simple
and integrated with maps) would make it easy.

------
tonyg
What's neat about this is its simplicity; its unencumbered nature; and its
independence from any particular mapping or ontology beyond "a rectangularish
portion of the surface of a sphere".

One neat application is for biologists recording locations of field samples.

------
tracker1
Aside, if you ever have to do location based matching, having an index on
hashes for rough locations with neighboring locations in multiple passes will
often be faster than geo indexing.

------
mscasts
This is really cool, but not really that much easier than coordinates. The
good thing about coordinates is that you can choose the kind of granularity
you want.

But kudos to Google for doing this.

~~~
nmca
These support truncation better than coordinates. With coordinates, truncation
indicates a different location, with these it indicates a larger area.

------
ZiiS
This doesn't seem to work in the UK. The closest box to my house partially
covers three homes, and would be interpreted as my neighbour's.

~~~
vidarh
If you then zoom in further you should be able to get a smaller box.

------
jpmoyn
How is this any different or better than current geo-hashing solutions?

------
JulianMorrison
Small hack: You can Google a code, and it finds it on the map, already :-D

~~~
dzhiurgis
And it does it incorrectly according to their own spec.

It's supposed to be a square, not a point.

------
thelittlenag
I'm involved with a startup that I believe has a wonderful solution to this
and other related problems. Our website:
[http://qalocate.com/](http://qalocate.com/)

Our platform: [http://qalocate.bamsaas.com/wp-content/uploads/2018/12/QA-
Lo...](http://qalocate.bamsaas.com/wp-content/uploads/2018/12/QA-Locate-
Platform-Overview.pdf)

The biggest issue with solutions like this isn't that they aren't clever, or
even that they aren't better than say a geohash or lat/lon, but that they have
the wrong target. Computers don't really care since its just as easy to parse
a geohash, a lat/lon, or an open location code. The tricky bit is when humans
get involved.

Its humans that have way more limitations when it comes to using complex
systems. And frankly, humans still use addresses because the system co-evolved
with us and our needs. Addresses solve the problem well enough, and have
"outs" for when they don't work. For a bit more in-depth discussion on this
see: [http://qalocate.bamsaas.com/2018/04/04/addresses-are-
complic...](http://qalocate.bamsaas.com/2018/04/04/addresses-are-complicated/)

So if we want to replace addresses, then we really have to think outside the
box. Fortunately, the web has done a lot of the heavy pushing by introducing
all kinds of new, useful, and exploitable semantics that we can apply in other
domains.

Humans are pretty good at using names for things. When computers were first
networked, we soon replaced IP addresses with names. Thus was DNS born. We
then combined that with another id, and soon we had email.

We believe that a similar system can be used for locations. No one really
cares about the exact geohash or lat/lon of a location, or the niftyness of
your coordinate system. Instead, what we need are memorable names. So why not
just use names?

That's what LNS ([http://qalocate.bamsaas.com/wp-content/uploads/2018/12/QA-
Lo...](http://qalocate.bamsaas.com/wp-content/uploads/2018/12/QA-Locate-
Location-Naming-System-LNS%E2%84%A2.pdf)) is. It works very similarly to DNS
and allows one to link arbitrary names to exact coordinate locations,
structures, or even regions.

For example, I can have "thelittlenag.frontdoor" if I want to point someone to
the exact coordinate of my front door. If I want drone deliveries, then maybe
I tell Amazon to use "thelittlenag.deliverydrone". The lawn guy can use
"thelittlenag.propertyboundaries" to figure where my property lines start and
end. And "thelittlenag.house" and "thelittlenag.gardenshed" can logically
reference as entities(!) the two structures we have on our property.

PM me if you have any questions.

~~~
qcodes
I too have developed and patented a location encoding system. Perhaps we could
work together. i don't know how to PM you. If I make a contact request on your
website, will that work.

