Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python implementation needs documentation, examples #557

Closed
nealmcb opened this issue Apr 2, 2023 · 1 comment
Closed

Python implementation needs documentation, examples #557

nealmcb opened this issue Apr 2, 2023 · 1 comment
Labels

Comments

@nealmcb
Copy link

nealmcb commented Apr 2, 2023

An easy way to start this is via some docstrings, in combination with #417.

Here are a few tips for those who peruse issues, in the meantime.

Some of the main functions, with defaults:

  • openlocationcode.encode(latitude, longitude, codeLength=10)
  • openlocationcode.decode(code)

Examples:

>>> from openlocationcode import openlocationcode as olc

>>> olc.encode(40,-105)
'85GQ2222+22'
>>> olc.decode('85GQ2222+22')
[40.0, -105.0, 40.000125, -104.999875, 40.0000625, -104.9999375, 10]
>>> olc.encode(40,-105, codeLength=4)
'85GQ0000+'
>>>olc.decode('85GQ0000+')
40.0, -105.0, 41.0, -104.0, 40.5, -104.5, 4]
@drinckes drinckes added the python label Jun 7, 2024
@drinckes
Copy link
Contributor

drinckes commented Jun 7, 2024

I'm going to add a note to #417 and close this as a duplicate.

@drinckes drinckes closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants