queryWithVisitor method

  1. @override
void queryWithVisitor(
  1. Envelope? searchEnv,
  2. ItemVisitor visitor
)
override

Queries the tree and visits items which may lie in the given search envelope. Precisely, the items that are visited are all items in the tree whose envelope may intersect the search Envelope. Note that some items with non-intersecting envelopes may be visited as well; the client is responsible for filtering these out. In most situations there will be many items in the tree which do not intersect the search envelope and which are not visited - thus providing improved performance over a simple linear scan.

@param searchEnv the envelope of the desired query area. @param visitor a visitor object which is passed the visited items

Implementation

@override
void queryWithVisitor(Envelope? searchEnv, ItemVisitor visitor) {
  ///
  /// the items that are matched are the items in quads which
  /// overlap the search envelope
  ///
  root.visit(searchEnv, visitor);
}