4 ms·
Would it be possible to extend geohash to define a polygon in a compact manner? e.g. ['9bc1db2', '9bc1db6', '9bc1db1', '9bc1db0', '9bc1db4', '9bc1db9', '9bc1db8
by mofosyne 3y ago
Would it be possible to extend geohash to define a polygon in a compact manner? e.g. ['9bc1db2', '9bc1db6', '9bc1db1', '9bc1db0', '9bc1db4', '9bc1db9', '9bc1db8', '9bc1dbd', '9bc1db3'] has lots of repetition. Might be nice to have a geopolyhash or something that can compress this...
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}
]
}
- metadat 3y agoIt seems better to have a shape which loses accuracy as you truncate characters, just like other geohash points.