Motivation
Geo-search features for Xapian text search library.
Common Retrieval Operations
- Restrict by distance
- Restrict by shape
- Weight by distance
- Sort by distance
- Sort by coordinate (N-S or E-W)
Why another format?
Goals
- Compact
- Efficient to use
- Nice rounding behaviour
- Truncates "nicely"
- Precision: human scale
First Observation
180 × 360 = 64,800 < 65,536
So nearest degree takes two bytes.
Second Observation
60 * 60 = 16 * 15 * 15
So nearest second of arc takes five bytes.
Precision
One second ~ 30m
so 1/16th of second < 2m
So six bytes gives precision better than 2m.
Demo
The End
Any questions or comments?