Hello,

I'm trying to delete items that have been added to an rtree Index. I  
am finding that the items still exist after I thought they were  
deleted. I am using spatialindex and rtree freshly checked out from  
svn trunk, and compiled on OSX 10.5.6 with Python 2.6.

The following test demonstrates my situation:

$python
 >>> from rtree import Rtree
 >>> i = Rtree()
 >>> i.insert(1, (0,0,5,5))
 >>> i.insert(2, (1,1,6,6))
 >>> i.insert(3, (2,2,7,7))
 >>> i.intersection((3,3,4,4))
[1L, 2L, 3L]
 >>> i.delete(2, (0,0,7,7))
 >>> i.intersection((3,3,4,4))
[1L, 2L, 3L]
 >>> i.delete(2, (2,2,5,5))
 >>> i.intersection((3,3,4,4))
[1L, 2L, 3L]
 >>> i.delete(2, (0.9,0.9,6.1,6.1))
 >>> i.intersection((3,3,4,4))
[1L, 2L, 3L]
 >>> i.delete(2, (1,1,6,6))
 >>> i.intersection((3,3,4,4))
[1L, 3L]
 >>>
 >>>

The item is not removed from the index when the window specified in  
the delete method is larger that it, but only when the window exactly  
matches its bounding box.

Is this the expected behavior, am I misunderstanding something?

Thanks,
Andrew
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to