where shapecode is one of { rect_ctr | rect_fwd }
SHP controls the shape of the area searched by Wherehoo, and the searcher's position within that shape.
The illustrations below
describe the area included around the searcher (indicated by a green dot) for
each shapecode.
rect_fwd is special: it looks "forward" from the searcher's current position at the searcher's current heading (determined by the HDG parameter, default 0°= North). The behavior of the width of search setting (WID) is not affected, but you may want to increase the length (LEN) of the search space. Because it's only looking ahead, the same LEN value used in a rect_ctr search would only cover half the area in a rect_fwd search.
In all searches, WID is considered to be a range directly left or right of the searcher, and LEN is considered to be a range directly ahead or behind.
Some people (me included) have asked why there's no "cir_ctr" to perform a perfectly circular search. Well... rect_ctr "only" picks up 27% more area than a circle of the same radius, and Wherehoo searches are not at all "directed" toward one specific goal, but toward exploration, so we didn't think it was too evil to return a bit more stuff. Second, Wherehoo calculates the distance to each item, so you can always direct your agent to punt any result whose range is too great. Finally, faking a circular search area isn't complicated, but I'm using a traditional SQL database behind this, so queries against oval shapes (WID != LEN) would have been more difficult... and if I forced all circular searches to have WID=LEN, then why even bother, since rectangles cover the same space equally well (see first excuse, above)?
rect_ctr is the default if SHP is not specified.
![]() |
![]() |
|
rect_ctr
|
rect_fwd
|