owntracks / recorder

Store and access data published by OwnTracks apps
Other
907 stars 123 forks source link

edit reverse geo result after lookup? #478

Closed tastytea closed 4 months ago

tastytea commented 4 months ago

i'm using opencage for reverse-geo lookups with OTR_PRECISION=5. my problem is that opencage returns a deceivingly precise address, while i was hoping it would simply return the city or district. is it possible to edit the returned data before it is stored?

is it possible to call the default revgeo function in the otr_revgeo hook, to wrap it in my own function?

jpmens commented 4 months ago

To the first part of your question, the answer is 'no'.

As to the second, we currently don't have a hook from otr_revgeo to the default reverse-geo lookup function. If you feel so inclined, you might be able to call OpenCage directly from it using Lua.

jpmens commented 4 months ago

Closing as answered