Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.75 KB

stissimple-geometry-data-type.md

File metadata and controls

57 lines (43 loc) · 1.75 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs monikerRange
STIsSimple (geometry Data Type)
STIsSimple (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
ignite-2024
STIsSimple_TSQL
STIsSimple (geometry Data Type)
STIsSimple (geometry Data Type)
TSQL
=azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric

STIsSimple (geometry Data Type)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance FabricSQLDB]

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

[!INCLUDEssNoVersion] return type: bit

CLR return type: SqlBoolean

Remarks

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

  • Each figure of the instance must not intersect itself, except at its endpoints.

  • No two figures of the instance can intersect each other at a point that is not in both of their boundaries.

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