Export (0) Print
Expand All
Expand Minimize

STIsSimple (geometry Data Type)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

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.

Applies to: SQL Server (SQL Server 2012 through current version), Azure SQL Database.

.STIsSimple ( )

SQL Server return type: bit

CLR return type: SqlBoolean

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.

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();
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft