3 ms·
This looks really useful. I've been using a similar geometry library 'S2'[1], by Google. It's mainly used for fast spatial indexing and comparison functionalit
by johneth 9y ago
This looks really useful.
I've been using a similar geometry library 'S2'[1], by Google. It's mainly used for fast spatial indexing and comparison functionality, albeit more 'approximate'[2] than Tile38 seems to be.
[1] http://s2geometry.io/ http://s2geometry.io/
[2] Approximate = not absolutely exact shapes when geofencing, for example.
- tidwall 9y agoI believe indexing with S2 can be made absolute if a polygon's boundary coverage cells contain a slice of the original shape. It's a bit more expensive on memory and insert times. But very fast and accurate queries. I've been experimenting with this method.
- gfrangakis 9y agoS2 can also output interior coverings, which will return only the cells in a covering that are fully contained in a polygon. So if you encounter a point (or any cell) whose parent is in an interior covering, you don't have to do any additional checks to produce an exact result (whereas on the boundary, you may want to do a point-in-polygon test to be exact).
- tidwall 9y agoRight! I forgot to mention that. You can totally skip the entire point-in-polygon for interior cells. So good.