Skip to content

akhenakh/insidetree

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

insidetree

This datastructure is specialized in indexing S2 cells to perform stab queries (Point in Polygons).

For explanations about s2 and the tree used in this package look at this great blogpost

It's an alternative of using an interval tree like in this other project exposed in this blogpost.

tree := NewTree()

// index you cells using Index()
tree.Index(cell, "Red building")

// test for cell of any levels 
insideCell := s2.CellIDFromLatLng(s2.LatLngFromDegrees(46.83808, -71.28046))
results := tree.Stab(insideCell)
// results[0] == "Red Building"

About

A tree datastructure to store s2 cells and perform fast point in polygons lookup

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages