Qarj / geohexa

Latitude and Longitude combined into one number
GNU General Public License v3.0
2 stars 0 forks source link

Add a formal specification #3

Open ppKrauss opened 6 years ago

ppKrauss commented 6 years ago

Hi, is a documentation suggestiom, to add something as spec.md.

A text with some rationale, showing, step-by-step, the "recipe of the geohex", so the formal specification of the algorithm.

The basic didactic explain you presented at Stackoverflow

The method works by dividing the world into a 36 x 36 grid. The first character is a longitude and the second character is a latitude. The latitude and longitude those two characters represent is the midpoint of that 'rectangle'. You just keep adding characters, alternating between longitude and latitude. Eventually the geohexa, when converted back to a lat and lon will be close enough to your original lat and lon.

Is a development from this paragraph to the basic Python or Javascript implementation, but using only "free text" and Mathematics instead a specific implementation language. Will be a higher abstraction to be used as referecence for all implementations, for discussions... and to present the geohex to people like me, that need to check fundameltals before to use as solution.

PS: you can use references as OSM page about precision of coordinates or this rationale for distance function to complement explanations.

Qarj commented 6 years ago

Thanks for this comment, I did attempt this with the "How" section, but you are right, it can be improved and tightened up somewhat.

Now that I know about the Geohash it remains to be seen if I will in fact attempt to develop this idea further or not. I may do one day as a kind of academic exercise.