STGeomCollFromWKB (geometry Data Type)
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Returns a geometrycollection instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Syntax
STGeomCollFromWKB ( 'WKB_geometrycollection' , SRID )
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Arguments
WKB_geometrycollection
Is the WKB representation of the geometrycollection instance you wish to return. WKB_geometrycollection is a varbinary(max) expression.
SRID
Is an int expression representing the spatial reference ID (SRID) of the geometry instance you wish to return.
Return Types
SQL Server return type: geometry
CLR return type: SqlGeometry
Remarks
The OGC type of the geometry instance returned by STGeomCollFromWKB()
is set to GeomCollection, MultiPolygon, MultiLineString, or MultiPoint, depending on the corresponding WKB input.
This method will throw a FormatException exception if the input isn't well formatted.
Examples
The following example uses STGeomCollFromWKB()
to create a geometry instance.
DECLARE @g geometry;
SET @g = geometry::STGeomCollFromWKB(0x0107000000020000000103000000010000000400000000000000000014400000000000001440000000000000244000000000000014400000000000002440000000000000244000000000000014400000000000001440010100000000000000000024400000000000002440, 0);
SELECT @g.STAsText();
See Also
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru