Skip to main content

what3chars

what3chars is a Python module that provides functions for decoding and encoding confusing, hard to decipher characters to and from latitude and longitude coordinates. It combines lower case and upper case 'L's, 'I's, and '1's into geospatially unique but visually indecipherable strings.

Example:

  >>> import what3chars
  >>> print 'what3chars for 42.6, -5.6:', what3chars.encode(42.6, -5.6)
  what3chars for 42.6, -5.6: LlIiILilLliIlL1LlIliIliIiIliL1l1LlIL

You can specify an arbitrary precision when encoding. The precision determines the number of characters in the what3chars:

  >>> print 'what3chars for 42.6, -5.6:', what3chars.encode(42.6, -5.6, precision=20)
  what3chars for 42.6, -5.6: LlIiILilLliIlL1LlIliI

Decoding a what3chars returns a (latitude, longitude) tuple:

  >>> print 'Coordinate for what3chars LlIiILilLliIlL1LlIliI:', what3chars.decode('LlIiILilLliIlL1LlIliI')
  Coordinate for what3chars LlIiILilLliIlL1LlIliI: ('42.6', '-5.6')

License

what3chars is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

what3chars is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with Geohash. If not, see http://www.gnu.org/licenses/.

This is a fork of https://github.com/vinsci/geohash

History

This is a parody of a popular geolocation system, and the code is a fork of Geohash by Leonard Norrgard. The only real changes are to replace the base32 pool of characters with combinations of indecipherable letters.

Release files for what3chars 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for what3chars 1.0.2
File Interpreter ABI Platform
what3chars-1.0.2-py3-none-any.whl Python 3 none any Details

Release files / what3chars-1.0.2-py3-none-any.whl

Download URL what3chars-1.0.2-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15b16bef41cf4799aef31cc0d09f976c552c50c08586563e5efdc7effd05e34b
BLAKE2b-256 checksum
How to use checksums
999e90b9dfa730e57920c8a3a00b931d16ba824cd350c97bdf935097b4be87e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page