STIsSimple (geometry Data Type)

**APPLIES TO:** ![yes](media/yes.png)SQL Server (starting with 2012) ![yes](media/yes.png)Azure SQL Database ![no](media/no.png)Azure SQL Data Warehouse ![no](media/no.png)Parallel Data Warehouse

Returns 1 if a geometry instance is simple, as defined by the Open Geospatial Consortium (OGC). Returns 0 if a geometry instance is not simple.

Syntax

  
.STIsSimple ( )  

Return Types

SQL Server return type: bit

CLR return type: SqlBoolean

Remarks

To be simple, a geometry instance must meet all of the following requirements:

Examples

The following example creates a nonsimple LineString instance that intersects itself and uses STIsSimple() to test whether the LineString is simple.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 2 2, 0 2, 2 0)', 0);  
SELECT @g.STIsSimple();  

See Also

OGC Methods on Geometry Instances