shapely.symmetric_difference_all#
- symmetric_difference_all(geometries, axis=None, **kwargs)#
Return the symmetric difference of multiple geometries.
This function ignores None values when other Geometry elements are present. If all elements of the given axis are None an empty GeometryCollection is returned.
- Parameters:
- geometriesarray_like
Geometries to calculate the combined symmetric difference of.
- axisint, optional
Axis along which the operation is performed. The default (None) performs the operation over all axes, returning a scalar value. Axis may be negative, in which case it counts from the last to the first axis.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
See also
Examples
>>> from shapely import LineString >>> line1 = LineString([(0, 0), (2, 2)]) >>> line2 = LineString([(1, 1), (3, 3)]) >>> symmetric_difference_all([line1, line2]) <MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))> >>> symmetric_difference_all([[line1, line2, None]], axis=1).tolist() [<MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))>] >>> symmetric_difference_all([line1, None]) <LINESTRING (0 0, 2 2)> >>> symmetric_difference_all([None, None]) <GEOMETRYCOLLECTION EMPTY>