Skip to main content

disjoint

Returns true if geometries a and b have no points in common.

Disjoint implies that intersects and (contains, containsProperly, within, covers, coveredBy, crosses, overlaps and touches) are all false.

warning

Do not use this function with invalid geometries. You will get unexpected results.

Parameters

NameTypeDescription
aGeometry | Prepared<Geometry>First geometry
bGeometrySecond geometry

Returns

boolean

true if the intersection of geometry a and b is an empty set

Throws

  • GEOSError on unsupported geometry types (curved)

See also

  • intersects returns whether geometries intersect; disjoint(a, b) === !intersects(a, b)
  • prepare improves performance of repeated calls against a single geometry

Examples