Skip to content

App: add url shortener #290

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

Merged
merged 2 commits into from
Apr 8, 2024
Merged

App: add url shortener #290

merged 2 commits into from
Apr 8, 2024

Conversation

zbycz
Copy link
Owner

@zbycz zbycz commented Apr 8, 2024

  • Every node, way and relation can now be accessed by short slug (max 7 letters).
  • The type is encoded by the last letter in slug (to not mix with n123/w456/r789 short ids).
  • The id is encoded mathematically using alphabet below
TYPE max id in 2024 shortened alphabet used
node 11 660 046 031 rtqty0n (a-zA-Z0-9) + n
way 173 514 748 opsgqew (a-z) + w
relation 17 089 246 blkhysr (a-z) + r

Examples:

Screenshot:

image

Note:

  • if bad words would become a problem, we can check against some list and for eg. a dash "-" on different positions would add 1111111 to the number.

Copy link

vercel bot commented Apr 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Apr 8, 2024 5:39pm

@zbycz zbycz merged commit ac9f89c into master Apr 8, 2024
@zbycz zbycz deleted the url-shortener branch April 8, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant