Giter Site home page Giter Site logo

py-rbush's Introduction

This library is extremely alpha. DO NOT USE for anything besides test / dev. We are still optimizing the library...so hold off for now.

Mission

The mission of RBush is to provide a performant, thread-safe RTree implementation for Python which does not have libspatialindex or geos as a dependencies.

Installation

conda install -c parietal.io rbush

py-rbush

Python port of JS rbush library

Tests

To run the (unit) tests, type:

$ pytest rbush

or

>>> import rbush
>>> rbush.test()

Performance

As in JS rbush, the following sample performance test was done by generating random uniformly distributed rectangles of ~0.01% area and setting maxEntries to 16 (see benchmark.py script). Performed with Python 3.6.1 on a Intel-i7 1.9GHz.

Test RBush(naive) RBush(numba,v0.0.1) RBush(numpy,v0.0.2)
insert 1M items one by one 224.9s 834.8s 251.4s
1000 searches of 0.01% area 5.30s 79.1s 7.5s
1000 searches of 1% area 13.5s 277.6s 8.1s
1000 searches of 10% area 47.6s 935.7s 16.5s
remove 1000 items one by one 2.61s 9.56s 7.3s
bulk-insert 1M items 63.7s 101.1s 25.1s

Changelog

0.0.2 -- Dec 12, 2017

  • insert accepts arrays for xmin, xmax, ymin, ymax
  • load receives a numpy array

py-rbush's People

Contributors

brendancol avatar chbrandt avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.