[go-nuts] Re: How to implement Segment Tree in key/value datastore to use Google S2 geometry?

2018-01-13 Thread Tamás Gulácsi
2018. január 14., vasárnap 5:48:11 UTC+1 időpontban Constantine Vassilev a következőt írta: > > I need to implement the following: > > 1) I have a database of ~100 mil records. > > Each record is of type key/value. > > The key is an internal ID of type: "123456789". > The value is a kml with geog

[go-nuts] Re: How to implement Segment Tree in key/value datastore to use Google S2 geometry?

2018-01-14 Thread Constantine Vassilev
Thanks for the suggestion and the link. The question is how it will be searched. Also I liked the Google S2's Golang implementation. >From the documentation if the link I see: -- Queries Bounding-box and k-nearest-neighbors queries are supported. Bounding-box queries require a search *Rect. It

Re: [go-nuts] Re: How to implement Segment Tree in key/value datastore to use Google S2 geometry?

2018-01-15 Thread Jesper Louis Andersen
My intuition is that this screams S2 at the top of its lungs, provided that you can hook into the structure. It is simply storing a radix tree (PATRICIA) of S2 cells and attaching information about box bounding to all of these. This yields a compressed trie-like structure that you can probably mai