Hello everyone,
On GitHub, Jon McPherson has raised an issue requesting clarification of the Open Location Code specification.
The question is, how should codes with fewer than 10 digits be handled by the shorten method?
"Shortening" a code works by using a reference location to work out what digits at the start of a code are unnecessary. For example, the code "8FVC9G8F+6W" can be shortened to just "9G8F+6W" using the location 47.26, 8.62.
But the spec is unclear on how codes with fewer than 10 digits, and specifically codes with padding zeros should be handled.
The questions are:
- Should shortening of codes with only eight digits be allowed? E.g. 8FVC9G8F+
- Should shortening of codes with six digits be allowed? E.g., 8FVC9G00+
- Should shortening of codes with two or four digits be allowed? E.g., 8FVC0000+
My feeling is that the answer to all of these should be yes, with the requirement that a shortened code always returns at least two significant digits. For example, 8FVC0000+, relative to the location 47.26, 8.62, is shortened to VC0000+.
This way, all codes are handled the same, regardless of the number of digits they possess.
Let's give this a minimum of a week and see what the comments say.
Ngā mihi,
Doug Rinckes,
Technical Program Manager, Google Switzerland GmbH; 9G8F+6W Zürich