3 ms·
This is why you have space filling curves. https://en.wikipedia.org/wiki/Z-order_curve https://en.wikipedia.org/wiki/Z-order_curve With that you can have a li
by thanatropism 8y ago
This is why you have space filling curves.
https://en.wikipedia.org/wiki/Z-order_curve https://en.wikipedia.org/wiki/Z-order_curve
With that you can have a linear ordering of space at each scale. Rounding errors become rounding errors. I remember seeing an implementation of that on npm or some such thing.
https://en.wikipedia.org/wiki/Geohash https://en.wikipedia.org/wiki/Geohash
- dgritsko 8y agoGeohashes are really cool, glad to see them mentioned in this thread. If you aren't familiar, you owe it to yourself to read the second Wikipedia article linked by the parent, it's a neat concept.
- acpetrov 8y agoYep. I saw a talk a while back about Uber sharding their caching layer by geohash
- lainga 8y agoWhich are great right up until you cross boundaries. IIRC there's a big boundary in Google's S2 that divides Toronto in half.
- thanatropism 8y agoThat’s also a problem when mapping a circle to a straight line. The band Rush sang “you can’t have something for nothing...”
- Pamar 8y agoSee also this http://www.drdobbs.com/database/space-filling-curves-in-geospatial-appli/184410998 http://www.drdobbs.com/database/space-filling-curves-in-geos... (Dr.Dobbs Journal, 1999). It explains how to easily search for "points no more than X km from Y" in a DB query without having to actually calculate distances.
- thanatropism 8y agoI wonder if space filling curves are used in the Python GIS stack for radius queries.