shapely.symmetric_difference_all#
- symmetric_difference_all(geometries, axis=None, **kwargs)#
Returns 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
- 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
For other keyword-only arguments, see the NumPy ufunc.reduce docs.
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>