Opened 15 years ago

Closed 15 years ago

#277 closed enhancement (fixed)

patch for geos::index::strtree::AbstractSTRtree::iterate

Reported by: sderle Owned by: strk
Priority: major Milestone: 3.2.0
Component: Core Version: main
Severity: Unassigned Keywords: STRtree
Cc:

Description

Attached find a patch that implements an iterate() method for geos::index::strtree::AbstractSTRtree. The method iterates over each ItemBoundable using the ItemVisitor pattern.

This method is needed because there is currently no public method for iterating over all items in the tree, without having to first build the tree (thus preventing further item insertion). The concrete use case for this method is storage of objects in an STRtree from scripting languages that use mark-and-sweep garbage collection, e.g. Ruby. This iterate() method permits the development of SWIG bindings for Ruby that wrap STRtree, without necessitating unwieldy separate accounting of objects stored in the tree.

Attachments (1)

strtree-iterate.patch (1.6 KB ) - added by sderle 15 years ago.

Download all attachments as: .zip

Change History (2)

by sderle, 15 years ago

Attachment: strtree-iterate.patch added

comment:1 by pramsey, 15 years ago

Resolution: fixed
Status: newclosed

Added to trunk at r2611.

Note: See TracTickets for help on using tickets.