Changeset 400

Show
Ignore:
Timestamp:
10/12/06 15:50:45 (2 years ago)
Author:
sgillies
Message:

add usage and performance notes to readme, remove dependencies

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Quadtree/trunk/DEPENDENCIES.txt

    r396 r400  
    1 - shapelib (http://shapelib.maptools.org) 
  • Quadtree/trunk/README.txt

    r396 r400  
     1 
    12Quadtree 
    23======== 
    34 
    4 A quadtree index for geospatial Python objects based on shapelib. 
     5Whether for PCL in-memory feature stores, Plone content, or whatever -- we need 
     6a simple spatial index to speed up retrieval of objects that intersect with a 
     7given bounding box. 
     8 
     9The simplest, most tried-and-true, open source spatial index is shapelib's 
     10(http://shapelib.maptools.org) quadtree. It's been improving the performance of 
     11MapServer applications for years. The quadtree itself is completely separable 
     12from any shapefile. We can use it with arbitrary Python object collections. 
     13 
     14Quadtree Protocol 
     15----------------- 
     16 
     17In a nutshell: 
     18 
     19  >>> index.add(id=id, bounds=[minx, miny, maxx, maxy]) 
     20  >>> [n for n in index.likely_intersection(bounds=[minx, miny, maxx, maxy])] 
     21  [id] 
     22 
     23This resembles a subset of the set protocol, and is all we need to begin. 
     24*add* indexes a new object by id, *likely_intersection* returns an iterator 
     25over ids where the node containing the id intersects with the specified 
     26bounding box. This method can produce false positives. It is up to the 
     27application to handle such false positive index hits and to map ids to objects. 
     28 
     29Performance 
     30----------- 
     31 
     32Even with the false positives, Quadtree wins over brute force intersection 
     33evaluations implemented in Python once you have more than ~20 points. See the 
     34tests/benchmarks.py file for a comparison. 
    535 
    636Installation 
     
    939$ python setup.py install 
    1040 
     41About Pleiades 
     42-------------- 
     43 
     44Pleiades is an international research network and associated web portal and 
     45content management system devoted to the study of ancient geography.  
     46 
     47See http://icon.stoa.org/trac/pleiades/wiki. 
     48 
     49Funding for the creation of this software was provided by a grant from the  
     50U.S. National Endowment for the Humanities (http://www.neh.gov). 
     51