sequence.intersects(geometry) → sequence
geometry.intersects(geometry) → bool
r.intersects(sequence, geometry) → sequence
r.intersects(geometry, geometry) → bool
Tests whether two geometry objects intersect with one another. When applied to a sequence of geometry objects,
intersects acts as a filter, returning a sequence of objects from the sequence that intersect with the argument.
point2 within a 2000-meter circle around
import com.rethinkdb.gen.ast.Point; Point point1 = r.point(-117.220406,32.719464); Point point2 = r.point(-117.206201,32.725186); r.circle(point1, 2000).intersects(point2).run(conn); // Result: true
Example: Which of the locations in a list of parks intersect a given circle?
r.table("parks").g("area") .intersects(r.circle(r.array(-117.220406, 32.719464), 10).optArg("unit", "mi")) .run(conn);
intersects command cannot take advantage of a geospatial secondary index. If you’re working with large data sets, you should consider using an index and the getIntersecting command instead of
Couldn't find what you were looking for?