ST_IsValid

Signature

BOOLEAN ST_IsValid(GEOMETRY geom);

Description

Returns TRUE if geom is valid.

Note

We have the following equivalence:
ST_IsValid(geom) = ARRAY_GET(ST_IsValidDetail(geom), 1)

Examples

SELECT ST_IsValid('POLYGON((0 0, 10 0, 10 5, 0 5, 0 0))');
-- Answer:    TRUE
SELECT ST_IsValid('POLYGON((0 0, 10 0, 10 5, 6 -2, 0 0))');
-- Answer:    FALSE

See also