Monday, June 14, 2010

The 10:10 Code

Four years ago I wrote about a way to encode the latitude and longitude of any point on the Earth's surface to 10m of accuracy with a 10 character code. Apart from a modification to the way the check digit is calculated, the code remains unchanged.

The idea is this: instead of giving people addresses, or coordinates, you can give them something like a post code for any point on the Earth's surface. This can then be entered into a GPS device and decoded. Thus a business can provide its 10:10 code and know that people will be able to find it.

I was reminded of this, this weekend when I took the Eurotunnel to France. On their web site they say:


Now those latitude and longitude values are very hard to enter, and, although in the UK post codes are pretty accurate, they are not universal (e.g. in France and the US there's no equivalent). In contrast the 10:10 code is global.

Here's some JavaScript code that calculates the 10:10 code:



The 10:10 code of the Eurotunnel terminal in the UK is: MED 8FV N9K5

PS. Many people have pointed out that there are existing systems like this, and existing patents. As far as I am aware, none of them include a check digit. For example, there's the Military Grid Reference System, the Natural Area Code, this Microsoft patent and Geohash. The check digit is critical because it reduces operator error when entering a location on a GPS device.

Labels:

If you enjoyed this blog post, you might enjoy my travel book for people interested in science and technology: The Geek Atlas. Signed copies of The Geek Atlas are available.

29 Comments:

Blogger M├írio Valente said...

You should propose this as worldwide postal code...

-- MV

4:29 PM  
Blogger Mark Russell said...

It'd be nice if the likes of Google maps (or my phone's Navigation or Maps app) understood it.

... and, if there were a web service like bitly for location that put me on the map of my choice in the right place.

... and, as an extension to that idea, if QR barcodes could link to the service.

5:52 PM  
Blogger Ross said...

Probably shouldn't use both "8" and "B" or "D" and "0"...

6:58 PM  
Blogger Bob said...

What about using both lower- and upper-case?

7:14 PM  
Blogger R said...

This looks like simple arithmetic.

I would suggest two basic improvements...

1) Take into account that at higher latitudes, longitude need not be encoded as accurately.

2) don't combine latitude and longitude. Keep them separate, with a space in between. That way, a human reader can tell that two encoded points are near each other.

7:17 PM  
Blogger John said...

What a great idea for a google maps mashup!

7:27 PM  
OpenID Charlie M said...

this code is made less readable by use of single character variable names. :( Is it too much to expand them please?

7:47 PM  
Blogger TextLogic Inc said...

Do you have reverse ? i.e. given the string splits to proper lan/lat ?

8:21 PM  
Blogger Kaveh Shahbazian said...

Very interesting!

Q1: Where in the code the radius 10m is specified? Can we produce code with 500m radius?

Q2: Does this mean all points in a radius of 10m distance of a specific point will produce the same code?

9:07 PM  
OpenID qbxk said...

cool stuff, two comments tho, first i translated your code to perl and couldn't get the same answer, so i then tried it in js and i got the same answer i got in perl!

so i think that the location at 51.09559,1.12207 maps to MEQ N6G 7NY5

secondly, c %= 29 you probably meant c %= base

10:18 PM  
OpenID qbxk said...

cool stuff, two comments tho, first i translated your code to perl and couldn't get the same answer, so i then tried it in js and i got the same answer i got in perl!

so i think that the location at 51.09559,1.12207 maps to MEQ N6G 7NY5

secondly, c %= 29 you probably meant c %= base

10:20 PM  
Blogger jdeisenberg said...

It's a clever idea, but it's too clever for a stupid person like me. I look at "MED 8FV N9K5," and it's not immediately obvious to me that it describes a point north of the equator and east of 0 longitude.

11:09 PM  
Blogger joe.marcato said...

Here is another way to make the resolution approximately consistent across the globe.
Enclose Earth into a cube. Divide each face of the cube into a 8,000,000 by 8,000,000 grid. Project the location onto the cube. The square number is your code. There are 3.84E14 squares on the cube: that's also 10 characters in base 29 but it gives you a resolution better than 1 meter on the ground anywhere in the world.

12:21 AM  
Blogger RJ said...

It would be nice (though technically impossible) to use a system where it's easier to calculate the distance between two points.

Perhaps putting a grid over a Winkel Tripel projection would work better

5:19 AM  
OpenID Yvo said...

I made "GLOCO" a while ago, it encodes lang/lat to a code of 5 up to 10 characters long, since takes into account populair locations in the worlds. Hence city centres have shorter codes, compared to deserts. (www.gloco.com)

6:49 AM  
Blogger Mukesh Agarwal said...

Hey Nice Idea man.. But I propose either to use alphabets only or remove some confusing (look a likes )LIke: (1 and I,l),(0,o,O),(B,8),(b,6)

8:13 AM  
Blogger tjp said...

I like this, even though practically it's not very usable. Yahoos WOEID doesn't do error checking, but does a few things that make it v powerful:

- takes accuracy into consideration
- brings some sort of place hierarchy
- helps when the geocode of a place changes (earthquakes etc)

It's a long way for WOEIDS to become something that can be put into a GPS device, but using smart metadata is always better than, er, not that smart.

London is 44418.

http://developer.yahoo.com/geo/geoplanet/guide/concepts.html

8:33 AM  
Blogger Jonas Hogstrom said...

I translated the code to C#, and I got MEQ N6G 7NY5 as well for the coordinates for the terminal coordinates. The SOC-algoritm from 2006 and the 1010-algorithm differs both in the calculation of the checksum and the alphabet used. the SOC-version uses a 32 character alphabet, and the 1010-version uses only 29 characters. My C# implementation (including exe) for both SOC and 1010 twoway conversions can be found at http://bit.ly/SOC1010

When I converted the 1010-coordinate back to latlong for the eurotunnel terminal, I got a difference of 11.1m from the original coordinates...

9:10 AM  
Blogger rob said...

So far so good but once encoded how does anyone else use it? Need a decode routine ideally with a link to Gmaps. Apart from that I agree with others who suggest eliminating ambiguous characters like I 1 l

11:44 AM  
Blogger suzie said...

This comment has been removed by a blog administrator.

11:45 AM  
Blogger Clay Shannon said...

I am not a scientist, but rather a "jack of all arts" (photography, music, and writing).

I "proposed" a similar way of uniquely encoding locations in my utopian novel "The Vavilovian Conspiracy"

Free to download from www.lulu.com/blackbirdcraven

2:26 PM  
OpenID id.php said...

Not a bad idea (and the checksum is nifty!). However, the GeoHash scheme has two important properties that 10:10 does not:

* arbitrary precision (to nearest 5 bits)
* lat/lon are interleaved

Bit interleaving in particular is useful because a geohash which is the prefix of another contains the other in its bounding box. Two geohashes which share prefixes are near each other. And so on.

This is great for search (e.g. google) and for use as a single database key for a location.

5:47 PM  
Blogger technogeist said...

Talk about a serendipitous finding.

I've been thinking of, and attempting to create something like this, to extend the concept universally unique identifiers. (UUIDs)

6:38 PM  
Blogger William T said...

Agree with id.php - any geo-code needs to have the ability to be humanly interpreted - so if you see two codes you can immediately tell if they are close to each other. Geohash has that ability since the left-hand characters encode enclosing (larger) areas.

2:48 AM  
Blogger mrjbq7 said...

And how about a version in Factor!

By the way, I also get "MEQ N6G 7NY5".

2:47 AM  
Blogger Nick Berardi said...

The US has something similar but it is not used. In the US it is called ZIP+4 and the +4 such as

12345-1234

Identifies a specific property and can be reversed to an address with the right database. However the ZIP+4 is very rarely used.

12:08 PM  
OpenID sneakatdatavibe said...

We don't need a twelfth system for encoding lat/lon tuples. Pick an existing one and start using it.

Currently, we have:

- decimal lat/lon

- d/m/s lat/lon

- UTM ( http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system )

- MGRS ( http://en.wikipedia.org/wiki/Military_grid_reference_system )

- Geohash ( http://geohash.org/ )

- "Natural Area Code" ( http://en.wikipedia.org/wiki/Natural_Area_Code )

Please, suggesting something like this and encouraging people to implement it is like coming out with a device that only charges over micro-USB. Just... don't.

1:00 PM  
Blogger gking86 said...

Maybe it's my military experience, but I find UTM or MGRS the easiest.

1:40 PM  
Blogger Holtwick said...

If you like it even shorter try my modified Geohash algorithm I used in my twittori.com project. http://blog.twittori.com/about-link-format/

2:43 PM  

Post a Comment

Links to this post:

Create a Link

<< Home