Was this helpful?
IsValidReason
ISVALIDREASON(Geometry)
Alias: ST_ISVALIDREASON
Returns reason if Geometry is invalid. Returns "Valid Geometry" if valid.
Result type: varchar(1024)
Example:
SELECT IsValidReason(PolyFromText('POLYGON((0 0, 0 4, 4 4, 4 0, 0 0))'));
 
Valid Geometry
 
SELECT IsValidReason(PolyFromText('POLYGON((0 0, 0 4, 4 4, 4 0, 2 6, 0 0))'));
 
Self-intersection[2.66666666666667 4]
Last modified date: 08/14/2024