Back to top

ReQL command: includes

Command syntax

sequence.includes(geometry) → sequence

geometry.includes(geometry) → bool


Tests whether a geometry object is completely contained within another. When applied to a sequence of geometry objects, includes acts as a filter, returning a sequence of objects from the sequence that include the argument.

Example: Is point2 included within a 2000-meter circle around point1?

> point1 = r.point(-117.220406, 32.719464)
> point2 = r.point(-117.206201, 32.725186)
>, 2000).includes(point2).run(conn)


Example: Which of the locations in a list of parks include circle1?

circle1 =[-117.220406, 32.719464], 10, unit='mi')

The includes command cannot take advantage of a geospatial secondary index. If you’re working with large data sets, consider using an index and get_intersecting before includes to narrow down the initial result set.

Example: Rewrite the previous example with getIntersecting.

circle1 =[-117.220406, 32.719464], 10, unit='mi')

Get more help

Couldn't find what you were looking for?