Add an internal max plus code length to all OLC implementations
zongweil opened this issue · 3 comments
zongweil commented
As discussed in this thread, we will internally process a max of 15 digits when encoding/decoding plus codes. This provides ~1cm x 0.5cm precision and will prevent the underflow errors mentioned in #12.
Specifically, the following changes will be made:
- If you ask the library to encode a lat/long with more than 15 digits, the library will return a plus code with 15 digits.
- If you ask the library to decode a plus code with more than 15 digits, the library will only take the first 15 digits into account with the returned code area.
- Plus codes with more than 15 digits will be treated as valid if all the other validity constraints are satisfied. If the plus code has an invalid character after the 15th digit, it will be treated as invalid.
This issue tracks the work of updating all the OLC libraries.
WilliamDenniss commented
#300 validates that this has been implemented in all languages (and fixes the last few remaining issues).
zongweil commented
Awesome! Marking this as closed.