google / s2geometry

Computational geometry and spatial indexing on the sphere
http://s2geometry.io/
Apache License 2.0
2.29k stars 302 forks source link

Points only optimization doesn't exist for indexing #294

Open MBkkt opened 1 year ago

MBkkt commented 1 year ago

https://github.com/google/s2geometry/blob/master/src/s2/s2region_term_indexer.cc#L213

It looks like same possible for index terms, am I right?

Why do I need other terms (not true_max_level) if query contains only points?

MBkkt commented 1 year ago

https://github.com/google/s2geometry/pull/296/commits/da933587ab1f8c162d31462e6b3e2036fa72c9fe

MBkkt commented 1 year ago

https://github.com/google/s2geometry/pull/296

MBkkt commented 1 year ago

@smcallis @jmr What do you think?

jmr commented 1 year ago

I don't know the algorithm well enough. Since you already implemented this as part of #296, can you write some tests and convince yourself it works? I can look in more detail next week.

MBkkt commented 1 year ago

Ok!

smcallis commented 1 year ago

I'm not familiar with this one either so I'd need some time to familiarize myself. A test case I can use to look at the performance internally would be helpful.