open-location-code icon indicating copy to clipboard operation
open-location-code copied to clipboard

Ada implementation

Open malaise opened this issue 3 years ago • 3 comments

Interested about an implementation of OLC in Ada?

I have translated the Cpp version and it is ready in my own environment (https://github.com/malaise/ada/tree/master/usr/olc). The differences from the Cpp verrsions are:

  • Ada typing ensures that input lat and long are within the correct range (-90 - 90) and (-180 - 180)
  • Codes that are too long are rejected as invalid instead of silently truncated (which leads some coding tests to be KO) Except the restriction above, the tests are OK.

malaise avatar Oct 08 '22 05:10 malaise

Neat! Easiest option would probably to add a link to your repo, e.g. like we have for Emacs Lisp: https://github.com/google/open-location-code/tree/main/emacs

Happy to review a PR.

bilst avatar Oct 10 '22 17:10 bilst

OK then.

I now have:

  • made standalone the library and test program
  • updated the test script so that it can run the "open-location-map" tests (except for lat-long out of bounds and for codes that are too long)
  • Added a short README.md So I think that you can add the "ada" directory with the link to the URL in my first post.

Thank you

malaise avatar Oct 11 '22 17:10 malaise

I wrote:

So I think that you can add the "ada" directory with the link to the URL in my first post.

Or do you want me to do it and submit a PR?

malaise avatar Oct 28 '22 14:10 malaise

Added it to the wiki: https://github.com/google/open-location-code/wiki/Other-Implementations

drinckes avatar May 24 '24 14:05 drinckes