Appearance
ST_ISVALID
Checks if a GEOGRAPHY value is well-formed and valid in 2D according to OGC rules.
For GEOGRAPHY objects with 3 or 4 dimensions, validity is still tested only in 2D.
See also:
Syntax
sql
ST_ISVALID(<input>)Arguments
<input>: TheGEOGRAPHYobject to be tested
Returns
Returns a BOOLEAN:
TRUEif the inputGEOGRAPHYis validFALSEif the inputGEOGRAPHYis invalid
Example
sql
SELECT ST_IsValid('POLYGON((0 0, 1 1, 1 0, 0 0))'::GEOGRAPHY);
-- TRUE
SELECT ST_IsValid('POLYGON((0 0, 1 1, 1 1, 0 0))'::GEOGRAPHY);
-- FALSE