Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.32 KB

stenvelope-geometry-data-type.md

File metadata and controls

49 lines (37 loc) · 1.32 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
STEnvelope (geometry Data Type)
STEnvelope (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
STEnvelope_TSQL
STEnvelope (geometry Data Type)
STEnvelope (geometry Data Type)
TSQL
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

STEnvelope (geometry Data Type)

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

Returns the minimum axis-aligned bounding rectangle of the instance.

Syntax

  
STEnvelope ( )  

Return Types

[!INCLUDEssNoVersion] return type: geometry

CLR return type: SqlGeometry

Examples

The following example uses STGeomFromText() to create a LineString instance from (0,0) to (2,3), and uses STEnvelope() to return the bounding box of the LineString.

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

See Also

OGC Methods on Geometry Instances