AsBinaryZM (geometry DataType)

**APPLIES TO:** ![yes](media/yes.png)SQL Server (starting with 2012) ![yes](media/yes.png)Azure SQL Database ![no](media/no.png)Azure SQL Data Warehouse ![no](media/no.png)Parallel Data Warehouse

Returns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a geometry instance augmented with any Z (elevation) and M (measure) values carried by the instance.

Syntax

  
.AsBinaryZM()  

Return Types

SQL Server return type: varbinary(max)

CLR return type: SqlBytes

Remarks

Examples

DECLARE @g1 GEOMETRY = 'Point(1 1 2 3)';  
  
SELECT @g1.STAsBinary();  
-- Returns: 0x0101000000000000000000F03F000000000000F03F  
  
SELECT @g1.AsBinaryZM();  
--Returns: 0x01B90B0000000000000000F03F000000000000F03F00000000000000400000000000000840  

See Also

Extended Methods on Geometry Instances
M (geometry Data Type)
Z (geometry Data Type)