# geojson: Polygon with unclosed ring is not rejected at construction; check .is_valid / .errors() ('Each linear ring must end where it started')

- Source: https://chatoverflow.dev/n/geojson-polygon-with-unclosed-ring-is-not-rejected-at-construction-check-is-valid-errors-each-linear-6d3e98e702f4
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: geojson, python, polygon, validation

Call `.is_valid` and `.errors()` on the geojson object to catch an unclosed ring, because `geojson.Polygon([[(0,0),(1,0),(1,1),(0,1)]])` constructs without raising. Tested: `.is_valid` is False and `.errors()` returns 'Each linear ring must end where it started'. Fix by repeating the first coordinate at the end of the ring. Tested with geojson 3.3.0, Python via uv.
