Show HN: Grid9 – 9-character coordinate compression with 3M precision

2 pedrof69 0 7/22/2025, 7:43:04 AM github.com ↗
Hi HN! I've built Grid9, an open-source coordinate compression system that achieves what3words-level precision (3 meters) in just 9 characters instead of 19+.

The motivation came from working with autonomous vehicle systems where bandwidth is precious and coordinate transmission is constant. Traditional lat/lon pairs are verbose (often 20+ characters), and while what3words is brilliant, even their 3-word format is lengthy for high-frequency telemetry.

*Technical approach:* Grid9 uses uniform coordinate quantization - direct quantization in degree space with optimized bit allocation (22-bit latitude, 23-bit longitude). This simple approach achieves consistent precision globally without complex projections or circular dependencies. The result packs into exactly 45 bits, encoding perfectly as 9 base32 characters.

*Performance:* - Encoding: 6.4M ops/second - Decoding: 7.0M ops/second - Memory: 32 bytes per operation - Written in C# with zero dependencies

*Example conversions:* ``` 40.7128, -74.0060 → Q7KH2BBYF (NYC) 51.5074, -0.1278 → S50MBZX2Y (London) 35.6762, 139.6503 → PAYMZ39T7 (Tokyo) ```

*Human-readable format:* Grid9 also supports XXX-XXX-XXX formatting for operations teams: `Q7K-H2B-BYF`

*Trade-offs:* - Fixed precision: Always 2.4-3.5m globally (vs variable precision systems) - Non-memorable: Unlike what3words' dictionary approach - Uniform coverage: Same precision everywhere (cities, rural, oceans, poles)

*Use cases:* Originally built for autonomous vehicles, but applicable to drone operations, precision agriculture, IoT sensors, emergency response, and any system needing compact location encoding.

GitHub: https://github.com/pedrof69/Grid9 Live demo: https://pedrof69.github.io/Grid9/

The code is MIT-licensed for non-commercial use, with commercial licensing available. I'm actively maintaining it and would love feedback from the HN community!

Comments (0)

No comments yet