Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.
Passing both the plpgsql and Golang encoded codes through pluscode_decode results in both returning the same output which does not cover the input latitude. Decoding both codes on plus.codes shows that the plpgsql code is incorrect.
Notice how both of these locations produce codes with only 4 characters after the + when the code length is set to 13 (inconsistent with other implementations), while the first example in this issue produced a code with 5 characters after the + with the same code length (consistent with other implementations). Note these examples also don't match other implementations output when truncated to 4 characters after the + either (same as the first example).
Encoding values with the plpgsql functions do not match other implementations, eg Golang:
While the Golang implementation at https://play.golang.org/p/IcIVqEHu2RE produces
863WR9C7+7662X
for the same input.Passing both the plpgsql and Golang encoded codes through
pluscode_decode
results in both returning the same output which does not cover the input latitude. Decoding both codes on plus.codes shows that the plpgsql code is incorrect.Furthermore some locations give a differing output length when calling pluscode_encode with the same codelength parameter:
Notice how both of these locations produce codes with only 4 characters after the + when the code length is set to 13 (inconsistent with other implementations), while the first example in this issue produced a code with 5 characters after the + with the same code length (consistent with other implementations). Note these examples also don't match other implementations output when truncated to 4 characters after the + either (same as the first example).