WITHIN key [CURSOR start] [LIMIT count] [SPARSE spread] [MATCH pattern] [WHERE field min max ...] [WHEREIN field count value [value ...] ...] [NOFIELDS] [FENCE] [DETECT what] [COMMANDS which] [COUNT|IDS|OBJECTS|POINTS|BOUNDS|(HASHES precision)] (GET key id)|(BOUNDS minlat minlon maxlat maxlon)|(OBJECT geojson)|(TILE x y z)|(QUADKEY quadkey)|(HASH geohash)
WITHIN searches a collection for objects that are fully contained inside of a specified bounding area.
WITHIN and INTERSECTS have identical syntax. The only difference between the two is that WITHIN returns objects that are contained inside an area, and intersects returns objects that are contained or intersects an area.
This command has many options, but at it’s most simplest it may appear like.
Above is a search around the rectangle with the southwestern point
33.462,-112.268 and the northeastern point
33.491,-112.245. A list of all objects that are fully contained inside the rectangle are returned.
For a complete list of search options please see the INTERSECTS command.
For a complete list of output formats please see the INTERSECTS command.
For a complete list of area formats please see the INTERSECTS command.