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>
: TheGEOGRAPHY
object to be tested
Returns
Returns a BOOLEAN
:
TRUE
if the inputGEOGRAPHY
is validFALSE
if the inputGEOGRAPHY
is 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