
On Thu, Sep 11, 2008 at 2:41 PM, Federico J. Fernández <federico.fernandez@gmail.com> wrote:
- Build a Quadtree. - Build an rTree. - Integrate some previous work from a former GSoC project of a k-d-tree. - Test and document everything.
When you do rectangle queries, I think you should use an output iterator rather than returning a deque like you do in this line from your tutorial: geometry::box<geometry::point_xy<double> > query_box( geometry::point_xy<double>(0.0, 0.0), geometry::point_xy<double>(5.0, 5.0)); std::deque< std::vector<std::string>::iterator > d = q.find(query_box); One, that is a rather heavy return type. Two, you're exposing an implementation detail. I find the following much nicer: geometry::box<geometry::point_xy<double> > query_box( geometry::point_xy<double>(0.0, 0.0), geometry::point_xy<double>(5.0, 5.0)); std::vector< std::vector<std::string>::iterator > d; q.find(query_box, std::back_inserter(d)); I haven't looked at the code, only the docs, so please excuse me if this functionality already exists. --Michael Fawcett