Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify what codes can be shortened in the spec #586

Open
drinckes opened this issue Jun 14, 2024 · 1 comment
Open

Clarify what codes can be shortened in the spec #586

drinckes opened this issue Jun 14, 2024 · 1 comment

Comments

@drinckes
Copy link
Contributor

(From #273 )

Review specification to clarify that all the following are permitted:

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+

I think we should also specify that padding after the plus e.g. +00G, is not permitted.

@fulldecent
Copy link
Contributor

fulldecent commented Dec 14, 2024

Here is a draft implementable specification for shortening codes. It clearly answers these questions and provides a clear regex to see what is a short code. (Which is also a useful but not optimized Perl implementation of the isShort function).

https://github.com/google/open-location-code/pull/463/files#diff-467a132a820489de16be4d53f7bd920eccd63b2bed5c986c95bd66064fa3d51cR100-R122

And also at

https://github.com/fulldecent/open-location-code/blob/new-spec/Documentation/Plus%20Codes%20Specification.md?plain=1#L106-L112


And if you want a different spec, that may be useful just as a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants