Geohash
en.wikipedia.org
en.wikipedia.org
e.g. maybe have a cbor structure that encodes this? Then maybe encode as base32 or base64 or whatever. If we can get a spec going then maybe we could also get a CBOR semantic tag if it doesn't exist already.
{ "origin": "9bc1db2", "vertices": [ {"deltaLat": 0.0001, "deltaLon": -0.0002}, {"deltaLat": 0.0003, "deltaLon": -0.0001}, {"deltaLat": -0.0002, "deltaLon": 0.0004}, {"deltaLat": -0.0006, "deltaLon": 0.0003}, {"deltaLat": -0.0003, "deltaLon": -0.0001}, {"deltaLat": -0.0004, "deltaLon": 0.0002}, {"deltaLat": 0.0002, "deltaLon": 0.0001}, {"deltaLat": 0.0004, "deltaLon": -0.0004}, {"deltaLat": -0.0001, "deltaLon": 0.0003} ] }
Really liked their talk on it!
Interesting to note that this S2 library is by Eric Veach, the guy who basically invented modern Monte Carlo path tracing, besides AdSense and AdWords: https://en.wikipedia.org/wiki/Eric_Veach
> Geohashes offer properties like arbitrary precision and the possibility of gradually removing characters from the end of the code to reduce its size (and gradually lose precision).
This is really cool and obvious reading it, but I somehow never thought about it that way. Are space-filling curves used in compression?
While space-filling curves are not useful for compression per se, they are commonly used in some data compression algorithms to convert multi-dimensional data structures (e.g. rasters) into a 1-dimensional byte stream for the compressor.
What3Word's bullshit pissed me off enough I fooled around with an open system based on the EFF's word lists some years back. If you combine them you can address any place on earth with 2 meter precision using 4 words, or 40 meter precision with 3 words.
I was just curious about how the numbers worked out so I never coded up anything meaningful to share, but I think it's an interesting idea. I also don't wanna get into any IP nonsense with people as obviously scummy and connected as W3W.
Compared to geohash the word granularity makes addressing rectangles vs points much more "chunky" but I think that's a tolerable tradeoff for a lot of applications.
W3W's entire business model is to make the mapping opaque so that you have to pay them money for lookups. Even worse, it means they intentionally destroyed any hierarchical locality in support of this. That's ducking absurd.
This idea can be an RFC anyone can implement for free. Even more craven is they successfully suckered a number of emergency services on paying for W3W.