Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.39 KB

File metadata and controls

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

STEnvelope (geometry Data Type)

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

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