Skip to main content

Maidenhead Locator, Lat Lon coordinate convertor

Project description

Maidenhead <-> Lat/Lon

DOI Actions Status Language grade: Python pypi versions PyPi Download stats

maidenhead provides a simple, yet effective location hashing algorithm. Maidenhead allows global location precision down to 750m

Maidenhead provides 4 levels of increasing accuracy

Level Precision
1 World
2 Regional
3 Metropolis
4 City

Install

pip install maidenhead

or for development version

git clone https://github.com/space-physics/maidenhead

pip install -e maidenhead

Examples

All examples assume first doing

import maidenhead as mh

lat lon to Maidenhead locator

mh.to_maiden(lat, lon, level)

returns a char (len = lvl*2)

Maidenhead locator to lat lon

mh.to_location('AB01cd')

take any string and returns topleft lat, lon of Maidenhead grid square.

Command Line

Python:

python Maidenhead.py 65 -148

Alternatives

We also have Maidenhead conversion for Julia.

Open Location Codes a.k.a Plus Codes are in Python code by Google.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maidenhead-1.4.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page