-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geo: geospatial builtin meta-issue (many easy issues inside, new 3D/M functions as of 2021-02-22!) #49203
Comments
Hi, @otan |
please look at the tags for individual tasks. they contain examples and a general approach of what to change. |
Hi, i know google s2 library is used for geography, but which library is used for geometry? |
@jievince we map the 2D plane onto S2 for indexing*, see https://www.cockroachlabs.com/blog/how-we-built-spatial-indexing/! |
Could 2d plane use s2 to build the index? I have a look at the doc here: |
ah right, we use GEOS for calculations, but fallback to S2 for indexing. |
Hi @otan, I'm still confused.
|
(1) yes, when we spatial index, we convert geometry into an S2 geography. this can generate false positives. you can look at the code that does this here: cockroach/pkg/geo/geoindex/s2_geometry_index.go Lines 177 to 205 in 46cef2c
and here: cockroach/pkg/geo/geoindex/s2_geometry_index.go Lines 428 to 488 in 46cef2c
(2) when we filter out false positives, we use GEOS to do the final filter, as you say. |
@otan Why need to convert geometry to S2 geography? cockroach/pkg/geo/geomfn/binary_predicates.go Lines 21 to 43 in 4d987b3
So my question is, what scenarios is S2 suitable for and why is it used? |
see the blog post: https://www.cockroachlabs.com/blog/how-we-built-spatial-indexing/ - we need this for divide the space.
this is for the implementation of we use S2 for divide the space indexing so we can quickly answer queries such as "which shape1 s2 coverings overlap shape2's s2 coverings". this can generate imprecise results, so there are false positives. but as the s2 indexing gets rids of a large number of negatives, we can then further filter using GEOS for precise queries. if you will, it's kind of a similar mechanism to a bloom filter. if you want to talk more about this, use the #spatial channel on our community slack - this issue is meant to track something else. |
I got that, really thanks. |
We have marked this issue as stale because it has been inactive for |
Hello friends! We're going geospatial in the upcoming release 🚀 🌏 and I've unleashed a number of issues we need help with implementing!
I've got three tags with issues you could help us implement:
The ones marked E-easy are the ones which are easy pickings. (These would be marked
good first issue
but that would overload the page) But if you felt like a challenge and want to pick a harder one, I'm only happy to egg you on 😛.You can ping me on the issue itself if you have any questions.
Jira issue: CRDB-4244
The text was updated successfully, but these errors were encountered: