[OSM-talk] 2D Barcodes for locations

simon at mungewell.org simon at mungewell.org
Fri Jun 4 04:17:28 BST 2010


> The 'shortlink' does not describe an object with OSM, it describes a
location on the planet (akin to a lat/long).
> ie:
> http://osm.org/go/0EEQCvG5-?m
> http://wiki.openstreetmap.org/wiki/Shortlink

I wanted to follow on from this idea a little as I think that there is
some potential here, if someone wants to run with it.

QR-Codes and DataMatrix have limitations in how much data and what type of
data can be stored, which results in varying sized barcodes.

For DataMatrix (which I have some experience in) there are several
'alphabets' with special sequences to switch between them. If the
shortlink was all upper, all lower or case independant this would be
better, but they are already defined to use the following encoding.

--
  # array of 64 chars to encode 6 bits. this is almost like base64
encoding, but
  # the symbolic chars are different, as base64's + and / aren't very  #
URL-friendly.
  ARRAY = ('A'..'Z').to_a + ('a'..'z').to_a + ('0'..'9').to_a + ['_','@']
--

Which means that the maximum compression can not happen, but link can be
represented in Text, C40, ASCII, Base256.

http://www.openstreetmap.org/?lat=51.507859&lon=-0.127828&zoom=18&layers=B000FTF
compresses to
http://osm.org/go/euu4gZ_It--?m

http://www.openstreetmap.org/?lat=51.507859&lon=-0.127828&zoom=10&layers=B000FTF
compresses to
http://osm.org/go/euu4gZ?m

I've attached some example images,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zoom10.png
Type: image/png
Size: 334 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20100603/efc4e9cc/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zoom18.png
Type: image/png
Size: 384 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20100603/efc4e9cc/attachment-0001.png>


More information about the talk mailing list