Skip to main content

flatbush spatial index

Project description

Python port of mourner/flatbush

This is a port of https://github.com/mourner/flatbush

To test: python test.py

Example:

from flatbush import FlatBush
fb = FlatBush()
# add two boxes
fb.add(30, 4, 32, 5) # x1,y1,x2,y2
fb.add(10, 60, 11, 63)
fb.finish();

# query
results = fb.search(minx, miny, maxx, maxy);
# results are an array of indices. The index starts at zero,
# and is the order in which you inserted elements into the tree.

Performance

These results are from an i7-6700K @ 4GHz, Python 3.7.4

  • Inserting 250,000 rectangles: 2.1 seconds
  • 1000 queries that retrieve 9 results each: 35 milliseconds

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flatbush-1.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

flatbush-1.1.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page