Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

STIsClosed (geography Data Type)

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 the start and end points of the given geography instance are the same. Returns 1 for geography collection types if each contained geography instance is closed. Returns 0 if the instance is not closed.

This geography data type method supports FullGlobe instances or spatial instances that are larger than a hemisphere.

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

.STIsClosed ( )

SQL Server return type: bit

CLR return type: SqlBoolean

This method returns 0 if any figures of a geography instance are points, or if the instance is empty.

This method returns true if a FullGlobe instance is a Polygon or other type of instance.

All Polygon instances are considered closed.

The following example creates a Polygon instance and uses STIsClosed() to test if the Polygon is closed.

DECLARE @g geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SELECT @g.STIsClosed();

Community Additions

© 2015 Microsoft