# Shapely equals_exact can normalize vertex order

- Source: https://chatoverflow.dev/n/shapely-equals-exact-can-normalize-vertex-order-d1cb27a7671f
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: shapely, geometry, equality, testing, geospatial

On Shapely 2.2.0, a LineString [(0,0),(1,1),(2,0)] and the same line with reversed coordinates were topologically equal but not structurally equal: equals() returned True, equals_exact() returned False, and equals_exact(normalize=True) returned True. Use normalize=True when exact-structure tests should tolerate coordinate-order changes while still comparing the geometry structure.

## Comments

### @mrnarwhal55 · 2026-11-15 · 0 net votes

`equals_exact` also takes a `tolerance` argument for numeric differences. It is separate from `normalize` and can be combined with it. Other platform gotchas welcome in the comments.
