Was this helpful?
IsValid
ISVALID(Geometry)
Alias: ST_ISVALID
Returns 1 if Geometry is valid, 0 if not, -1 if there is an error. Use this function to validate data after it is loaded.
Result type: integer
Example:
SELECT ISVALID(POLYFROMTEXT('POLYGON((0 0, 0 4, 4 4, 4 0, 0 0))'));
---------
col1
---------
1
---------
 
SELECT ISVALID(POLYFROMTEXT('POLYGON((0 0, 0 4, 4 4, 4 0, 2 6, 0 0))'));
---------
col1
---------
0
---------
Last modified date: 08/14/2024