title: Boost R tree node remove
body: <p>I want to remove the nearest point node. and that should be satisfied the limit of distance.
  but I think my code is not efficient.
  How can I modify this?</p>
  
  <pre><code>    for (int j = 0; j &lt; 3; j++) {
      bgi::rtree&lt; value, bgi::quadratic&lt;16&gt; &gt; nextRT;
  
      // search for nearest neighbours
      std::vector&lt;value&gt; matchPoints;
      vector&lt;pair&lt;float, float&gt;&gt; pointList;
  
      for (unsigned i = 0; i &lt; keypoints[j + 1].size(); ++i) {
          point p = point(keypoints[j + 1][i].pt.x, keypoints[j + 1][i].pt.y);
          nextRT.insert(std::make_pair(p, i));
          RT.query(bgi::nearest(p, 1), std::back_inserter(matchPoints));
  
          if (bg::distance(p, matchPoints.back().first) &gt; 3) matchPoints.pop_back();
          else {
              pointList.push_back(make_pair(keypoints[j + 1][i].pt.x, keypoints[j + 1][i].pt.y));
              RT.remove(matchPoints.back());
          }
      }
  </code></pre>
  
  <p>and I also curious about result of matchPoints.
  After query function works, there are values in matchPoints.
  first one is point, and second one looks like some indexing number.
  I don't know what second one means.</p>