Skip to main content

Module validate

Module validate 

Source
Expand description

Geometry validation (geo_is_valid).

Checks structural validity per OGC Simple Features:

  • Polygon rings must be closed (first == last coordinate)
  • Polygon rings must have at least 4 points (triangle + close)
  • Polygon exterior ring should be counter-clockwise (right-hand rule)
  • Polygon holes should be clockwise
  • No self-intersection of ring edges
  • LineStrings must have at least 2 points

Functionsยง

is_valid
Whether a geometry is valid (no issues).
validate_geometry
Validate a geometry. Returns a list of issues (empty = valid).