The first argument selects the data to operate on.

The second argument is either the string global or is a layer address. The rtree name in the third argument must correspond to the value of this argument: some of the rtrees are global, others are per layer.

The third argument is the name of the rtree to search. The following rtrees are available:

name | scope | description
--- | --- | ---
padstack | global | padsatck objects (typically used for vias, pins, pads)
subc | global | subcircuit objects
rat | global | rat lines
line | layer | line objects
text | layer | text objects
polygon | layer | polygon objects
arc | layer | arc objects
gfx | layer | gfx (bitmap/pixmap) objects

Note: rtrees are global to the given scope, e.g. the padstack rtree holds all padstacks (inside and outside of subcircuits) and a layer's line rtree holds all line objects that appear on the given layer (inside and outside of subcircuits).

Optionally four more arguments may be supplied; when present, these are 4 coordinates that specify the bounding box of the search by the x and y coordinates of top left and bottom right corners. When these coordinates are not specified all objects on the rtree is listed.