Opps - showing my geo-ignorance... So yes it looks like the github open-location-code has existing Java routines for both encoding (lat+long -> code) and decoding (code -> lat+long) plus codes, which could probably be pulled in as a lib and write a simple wrapper to expose as respective XPath functions.
Since the code is readily available anyway, I'd suggest implementing both geopoint-to-pluscode() and pluscode-to-geopoint() for completeness, in one PR hit.
Is anything new for implementing the geopoint-to-pluscode() and pluscode-to-geopoint() into ODK? Kenya, at least Kisumu County, has implemented plus code on every building. It would be interesting for me to use ODK to collect GPS location and also has the translation to and back from the plus code.
image: Plus Code used in Kisumu County
I dont believe anything further has been done on this. However, if it is just decoding Plus codes you need, and perhaps if all your Plus Codes are of a known fixed length, then - looking at the decode algorithm - it is probably something that you could conceivably accomplish with a few in-form calculations [variable length Plus Codes will be messier, because there's no good way of mimicking for-loops other than with a repeat group...].
Hi @doug, I'm bumping an old thread but I have a need for this!
My use case is we are working with a country in Africa that has implemented plus code digital addressing, including adding plus code signage to properties.
Field enumerators who are collecting information about properties will record the plus code from the signs where available (which is the recognized official digital address of the property). However where the signs are not available (say due to new construction, or in areas where the project is yet to be implemented) they need to record the Plus Code that represents the centroid of the roof of the property of interest.
My desired workflow is that they open the map in satellite view at the area where they are standing, they tap on the place on the map that represents the centroid of the roof of the property of interest, and the Plus Code will be recorded into a field in ODK collect.
@yanokwa I sent you an email about this as well. Is what I am looking for achievable with ODK, and can you provide links to reference material that will help me to achieve this?