This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Pyqtree is a pure Python spatial index for GIS or rendering usage. It stores and quickly retrieves items from a 2x2 rectangular grid area, and grows in depth and detail as more items are added. The actual quad tree implementation is adapted from Matt Rasmussen’s compbio library and extended for geospatial use.

Platforms

Python 2 and 3.

Dependencies

Pyqtree is written in pure Python and has no dependencies.

Installing It

Installing Pyqtree can be done by opening your terminal or commandline and typing:

pip install pyqtree

Alternatively, you can simply download the “pyqtree.py” file and place it anywhere Python can import it, such as the Python site-packages folder.

Example Usage

Start your script by importing the module.

import pyqtree

Setup the spatial index, giving it a bounding box area to keep track of. The bounding box being in a four-tuple: (xmin,ymin,xmax,ymax).

spindex = pyqtree.Index(bbox=[0,0,100,100])

Populate the index with items that you want to be retrieved at a later point, along with each item’s geographic bbox.

# this example assumes you have a list of items with bbox attribute
for item in items:
    spindex.insert(item=item, bbox=item.bbox)

Then when you have a region of interest and you wish to retrieve items from that region, just use the index’s intersect method. This quickly gives you a list of the stored items whose bboxes intersects your region of interests.

overlapbbox = (51,51,86,86)
matches = spindex.intersect(overlapbbox)

There are other things that can be done as well, but that’s it for the main usage!

More Information:

License:

This code is free to share, use, reuse, and modify according to the MIT license, see LICENSE.txt.

Credits:

Karim Bahgat (2015)

Release History

Release History

0.24

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.23

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Pyqtree-0.24.zip (8.8 kB) Copy SHA256 Checksum SHA256 Source Jun 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting