shapely.disjoint#
- disjoint(a, b, **kwargs)#
Return True if A and B do not share any point in space.
Disjoint implies that overlaps, touches, within, and intersects are False. Note missing (None) values are never disjoint.
If you need to test multiple geometries against the same geometry A, you can improve performance by preparing A in advance using
prepare().- Parameters:
- a, bGeometry or array_like
Geometry or geometries to check.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
See also
intersectsdisjoint(A, B) == ~intersects(A, B)prepareimprove performance by preparing
a(the first argument)
Examples
>>> import shapely >>> from shapely import GeometryCollection, LineString, Point >>> line = LineString([(0, 0), (1, 1)]) >>> shapely.disjoint(line, Point(0, 0)) False >>> shapely.disjoint(line, Point(0, 1)) True >>> shapely.disjoint(line, LineString([(0, 2), (2, 0)])) False >>> empty = GeometryCollection() >>> shapely.disjoint(line, empty) True >>> shapely.disjoint(empty, empty) True >>> shapely.disjoint(empty, None) False >>> shapely.disjoint(None, None) False