Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geo/geoindex: interface for geometry and geography indexing, and
implementation of those interfaces by s2GeometryIndex and s2GeographyIndex Both implementations use the S2 library to map 2D space to a single dimension. The implementations have TODOs regarding heuristics that will be addressed after we have end-to-end benchmarks. The geometry index abuses S2 by using face 0 of the unit cube that will be projected to the unit sphere, to index the rectangular bounding box of the index. This introduces two distortions: rectangle => square, and square side of unit cube => unit sphere. Geometries that exceed the bounding box are clipped, and indexed both as clipped, and under a special cellid that is unused by S2. Index acceleration is restricted to three relationships: Covers, CoveredBy, Intersection. Other relationships will need to be expressed using these. CoveredBy uses an "inner covering" to deal with the fact that coverings do not have the strong properties of bounding boxes. The CoveredBy produces an expression involving set unions and intersections that is factored to eliminate common sub-expressions and output in Reverse Polish notation. How to compute this expression during query execution is an open topic. More tests will be added in subsequent PRs, as indicated in TODOs. Release note: None
- Loading branch information