A Cython port of Flatbush for fast, static 2D spatial indexing
kylebarron / pyflatbush Goto Github PK
View Code? Open in Web Editor NEWA Cython port of Flatbush for fast, static 2D spatial indexing
License: MIT License
A Cython port of Flatbush for fast, static 2D spatial indexing
License: MIT License
index = pyflatbush.Flatbush(arr.shape[0], 100)
out = index.add_vectorized(arr[:, 0], arr[:, 1], arr[:, 2], arr[:, 3])
index.finish()
Then index._indexes
stores the sorted order of all input shapes. So arr[index._indexes]
would return all input boxes sorted by their hilbert value.
index._levelBounds
gives the starting (?) index in index._boxes
of each level of the tree. So when nodeSize
is smaller, levelBounds
is a larger array, and vice versa. The beginning of levelBounds is the smallest boxes; the end of levelBounds are the largest boxes.
So for example looking at the boxes from 3 to 4:
np.array(index_cy._boxes[index_cy._levelBounds[3]:index_cy._levelBounds[4]]).reshape(-1 , 4)
Looking at the boxes from 4 to 5:
np.array(index_cy._boxes[index_cy._levelBounds[4]:index_cy._levelBounds[5]]).reshape(-1 , 4)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.