Yet another short-link specification for geo-coordinates.
Project description
Geo58
Yet another short-link specification for geo-coordinates.
Key Features
- uses base-58 encoding
- can be as short as 8 characters, mostly 9 characters
- maximum length of 10 characters
- resolves to about 1.1m accuracy
- geocoordinates that are close, look similar
- can include a zoom level of a map (20-5)
Base-58 encoding
Base-58 encoding uses 58 alphanumerical characters of the alphabet plus 9 digits. Characters that look similar ('0', 'O', 'I', 'l') are omitted. This allows for manual copying of data with little potential for ambiguity.
8-10 characters short
The encoding is done in the followin schema:
[Zoom 4bit][joined [Lat 25bit][Lon 26bit]]
Zoom
: beeing an optional parameter for a possible viewport (see below).posLat
: is the latitude (mapped from [-90,90] to [0, 180]).posLon
: is the longitude (mapped from [-180,180] to [0, 360]).
The last 51 bit are 'intervoven' to generate a bit-sequence with least significant bits to the right. This allows the generation of short-strings that are similar to each other if they are close to one another.
Link similarity
The following 3 links, refer to cafes in Heidelberg, which are only ~25m apart:
- https://yosm.at/NBiwwcnfq;amenity=cafe
- https://yosm.at/NBiwwcnuw;amenity=cafe
- https://yosm.at/NBiwwcnZc;amenity=cafe
Zoom level (can be) included
4 bit of the short-string are used to encode the zoom level of a viewport. This can be used to hint at the size of the object that is being referred to. The zoom level is pre-fixed to the bit-sequence. It is also 'inverted' to allow zoom level 20 to be represented as zero and 19 as one. Zomm level 5 would be using 4 bits.
As the zoom level is pre-fixed, zoom level 20 does not 'consume' any bit-bandwidth, resulting in a short-string being as short as possible.
Credit
This format came to be during the creation of a short-link format for YellowOSM.
YellowOSM is supported by NetIdee.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file geo58-1.0.0b1.tar.gz
.
File metadata
- Download URL: geo58-1.0.0b1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58741677708b0873fb9816763fd684ae65af61a3518daecfbde1bcf737b9a8d8 |
|
MD5 | d8f6c713aaaa554793f31af794b7d5be |
|
BLAKE2b-256 | 7cd65d2871344052b42e737bc4fa6fe8e31c8246d85d3f2540879be8b04123d4 |
File details
Details for the file geo58-1.0.0b1-py3-none-any.whl
.
File metadata
- Download URL: geo58-1.0.0b1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e171f4fc492270c3f07fcb1255f8faef1aa6632376dae94db18c538bbfed4fa |
|
MD5 | 4819a5ccb59bd415fe0d6ab723cff32b |
|
BLAKE2b-256 | 0d0b66efee7e5a04d09fc55c823797dfcd6c816e5cdd759f97fdf2fae3da4c74 |