I'll say no, just to be safe. This certainly isn't in the contract of Quadtree (and I don't think it's a desirable constraint to have to meet). It may currently have that behaviour, but if so that's just a happy coincidence.


Jones, Patrick L. wrote:
Howdy,

        Does the list that a query(Envelope searchEnv) on a Quadtree returns 
always have the returned items in the same order?  I have two overlapping 
Envelopes which I have inserted into Quadtree. If I do a query on the Quadtree 
where the searchEnv is in the overlapping area will the result list always have 
the envelopes in the same order?



Coordinate c1 = new Coordinate(0.0,0.0); Coordinate c2 = new Coordinate(2.0,2.0); Coordinate c3 = new Coordinate(1.0,0.0); Coordinate c4 = new Coordinate(3.0,2.0);


// e1 overlaps e2
Envelope e1 = new Envelope(c1,c2); Envelope e2 = new Envelope(c3,c4);

Coordinate pt = new Coordinate(1.5,1.0); // a pt in both e1 and e2
Envelope inner = new Envelope(pt);

Quadtree qtree = new Quadtree();
        
 qtree.insert(e1,c1);
 qtree.insert(e2,c2);
List list = qtree.query(inner); // will list always have c1 and c2 in the same order?

Thanx,

Pat

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel


--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to