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

Reuse the Geohash prefix #8

Open
ppKrauss opened this issue Nov 30, 2019 · 0 comments
Open

Reuse the Geohash prefix #8

ppKrauss opened this issue Nov 30, 2019 · 0 comments

Comments

@ppKrauss
Copy link

ppKrauss commented Nov 30, 2019

((This project was abandoned, so, if there are a good alternative where we can post issues, please comment here.))

Suggestion, as we can see at README illustrations, there are a lot of reduntant information in a list of Geohashes of a proximity. The commom prefix is not perfect, but a soution is to use a separator to mark the parent digit or a start character to mark the only prefix. Suppose using "_" as mark:

  • one commom prefix:
    {u09w58, u09w5b, u09tuz} = prefixes(u09) + {_w58, _w5b, _tuz}.

  • many (2,3 or 4) prefixes:
    {u09w58, u09w5b, u09tuz, u0812, u081b} = prefixes(u09, u081) + {1_w58, 1_w5b, 1_tuz, 2_2, 2_b}.

It is a simple "cut prefix redundance" easy/intuitive algorithm (so it is human readable) for enhance labels in data visualization or compress a long list of geohashes.

When in the context not exist risk of confusion with complete Geohash, we can cut the mark supposing that it is a simple operation:

  • of concatenation at {w58, w5b, tuz};
  • of "replace first digit" at {1w58, 1w5b, 1tuz, 22, 2b}.

PS: in the proxymity of "many" geohashes we can use, instead [1,2,3,4] the "N,S,O,W", in upper case, to reuse direction information, that is (perhaps) more human-readable, but need a complex algorithm to detect directions.

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

No branches or pull requests

1 participant