Example #1
0
 /// <summary>
 /// Queries the specified search extent. If this node is completely
 /// enclosed by the search extent, the <see cref="PassAll"/> method gets
 /// called to process all points with no further spatial checks. For
 /// nodes that partially overlap, each point is checked against the
 /// search extent.
 /// </summary>
 /// <param name="searchExtent">The search extent.</param>
 /// <param name="itemHandler">The method that should be called for each query hit (any
 /// node with an extent that overlaps the query window)</param>
 internal override void Query(Extent searchExtent, ProcessItem itemHandler)
 {
     if (this.Window.IsOverlap(searchExtent))
     {
         if (this.Window.IsEnclosedBy(searchExtent))
         {
             PassAll(itemHandler);
         }
         else
         {
             foreach (IPoint p in m_Items)
             {
                 if (searchExtent.IsOverlap(p.Geometry))
                 {
                     bool keepGoing = itemHandler(p);
                     if (!keepGoing)
                     {
                         return;
                     }
                 }
             }
         }
     }
 }