shapely.normalize#
- normalize(geometry, **kwargs)#
Convert Geometry to strict normal form (or canonical form).
In strict canonical form, the coordinates, rings of a polygon and parts of multi geometries are ordered consistently. Typically useful for testing purposes (for example in combination with
equals_exact
).- Parameters:
- geometryGeometry or array_like
Geometry or geometries to normalize.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
Examples
>>> from shapely import MultiLineString >>> line = MultiLineString([[(0, 0), (1, 1)], [(2, 2), (3, 3)]]) >>> normalize(line) <MULTILINESTRING ((2 2, 3 3), (0 0, 1 1))>