shapely.relate#
- relate(a, b, **kwargs)#
Return a string representation of the DE-9IM intersection matrix.
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
prepareimprove performance by preparing
a(the first argument)relate_patterncheck if the DE-9IM relationship code satisfies a pattern
Examples
>>> import shapely >>> from shapely import LineString, Point >>> point = Point(0, 0) >>> line = LineString([(0, 0), (1, 1)]) >>> shapely.relate(point, line) 'F0FFFF102'