is there a (linux) batch script to convert from latitude/longitude to plus code ?

114 views
Skip to first unread message

Marc Meurrens

unread,
Jun 3, 2019, 10:07:24 AM6/3/19
to Plus Codes Community Forum
Hello,
I extract latitude/longitude from exif data of photos.
I want to rename (and organize them) introducing the plus code in their name.
Thanks for your help.
Marc

Barry Hunter

unread,
Jun 3, 2019, 10:16:17 AM6/3/19
to Plus Codes Community Forum
Doesn't seem to be an official, plus code implementation in Bash/sh sheel script etc. To be honest the maths is getting a little involved to run in pure shell script. 

The python implementation would probably be easiest, would be pretty simple python script


looks useful. 




--
Public site: http://www.openlocationcode.com/
Github project: https://github.com/google/open-location-code
Demo site: http://plus.codes/
---
You received this message because you are subscribed to the Google Groups "Plus Codes Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-location-c...@googlegroups.com.
To post to this group, send email to open-loca...@googlegroups.com.
Visit this group at https://groups.google.com/group/open-location-code.
To view this discussion on the web, visit https://groups.google.com/d/msgid/open-location-code/87a4a63c-b144-438a-895e-e4fde3e1b0f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marc Meurrens

unread,
Jun 4, 2019, 5:20:15 PM6/4/19
to Plus Codes Community Forum
[RESOLVED]
linux
bash conversion between latitude/longitude and OLC

Thanks Barry!

For those without any knowledge of Python, the archive file
provide all the scripts, where and how to install them, and how to use them.

Hope this helps.

</marc>

Le lundi 3 juin 2019 16:16:17 UTC+2, Barry Hunter a écrit :
Doesn't seem to be an official, plus code implementation in Bash/sh sheel script etc. To be honest the maths is getting a little involved to run in pure shell script. 

The python implementation would probably be easiest, would be pretty simple python script


looks useful. 




On Mon, Jun 3, 2019 at 3:07 PM Marc Meurrens <m.me...@gmail.com> wrote:
Hello,
I extract latitude/longitude from exif data of photos.
I want to rename (and organize them) introducing the plus code in their name.
Thanks for your help.
Marc

--
Public site: http://www.openlocationcode.com/
Github project: https://github.com/google/open-location-code
Demo site: http://plus.codes/
---
You received this message because you are subscribed to the Google Groups "Plus Codes Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-location-code+unsub...@googlegroups.com.
olc-scripts.tar.xz

José Damico

unread,
Jan 14, 2020, 11:40:01 PM1/14/20
to Plus Codes Community Forum
You can use this java implementation that runs on command line: https://github.com/Scicrop/tests.pluscodes

River Mersey

unread,
Jan 14, 2020, 11:58:10 PM1/14/20
to Plus Codes Community Forum
TBH, python isn't my language and I've just had a quick look at the attached script.

From what I understand of pluscodes, there are 2 parts to the algorithm. First part steps through generating pairs of char codes. Second part then gives a single char code for increasingly smaller grids of 20 sections. 

Python script given here seems to just repeatedly apply the first part of the algorithm - which I don't think is correct.

As I say, python isn't my language, and I've just quickly looked at it, so I'll happily accept that I'm likely to be wrong!
Reply all
Reply to author
Forward
0 new messages