Returns the well-known binary (WKB) representation of the bounding box diagonal of a pcpatch object. Use this function to pass spatial extent data to PostGIS geometry functions or client-side spatial libraries that consume WKB input. WKB preserves full numeric precision, avoiding the rounding that can occur with text-based formats.
Syntax
bytea ST_boundingDiagonalAsBinary(pcpatch pc);Parameters
| Parameter | Description |
|---|---|
pc | The pcpatch object whose bounding box diagonal is returned. |
Usage notes
The bounding box is a 2D geometry object.
Examples
SELECT ST_BoundingDiagonalAsBinary(
ST_Patch(ARRAY[
ST_MakePoint(1, ARRAY[0.,0.,0.,10.]),
ST_MakePoint(1, ARRAY[1.,1.,1.,10.]),
ST_MakePoint(1, ARRAY[10.,10.,10.,10.])
])
);Result:
\x01020000a0e610000002000000000000000000000000000000000000000000000000000000000000000000244000000000000024400000000000002440该文章对您有帮助吗?