filter(filterFunc, bbox = null) {
    if (bbox !== null && !this.bbox.intersect(bbox)) {
      return [];
    }

    if (filterFunc(this)) {
      return [this];
    }
    const l = this.left ? this.left.filter(filterFunc, bbox) : [];
    const r = this.right ? this.right.filter(filterFunc, bbox) : [];
    return l.concat(r);
  }
// filter from top to bottom, if true, terminate and return the node, othervise, test the children
filter from top to bottom, if true, terminate and return the node, othervise, test the children
filter from top to bottom if true terminate and return the node othervise test the children
filter(filterFunc, bbox = null) {
    if (bbox !== null && !this.bbox.intersect(bbox)) {
      return [];
    }
    if (filterFunc(this)) {
      return [this];
    }
    const l = this.left ? this.left.filter(filterFunc, bbox) : [];
    const r = this.right ? this.right.filter(filterFunc, bbox) : [];
    return l.concat(r);
  }
filter ( filterFunc , bbox = null ) { if ( bbox !== null && ! this . bbox . intersect ( bbox ) ) { return [ ] ; } if ( filterFunc ( this ) ) { return [ this ] ; } const l = this . left ? this . left . filter ( filterFunc , bbox ) : [ ] ; const r = this . right ? this . right . filter ( filterFunc , bbox ) : [ ] ; return l . concat ( r ) ; }
filter from top to bottom, if true, terminate and return the node, othervise, test the children
filter from top to bottom if true terminate and return the node othervise test the children