Return the Well-Known Text (WKT) or the Extended Well-Known Text (EWKT) representation
asText({tcbuffer,tcbuffer[],cbuffer[]}) → {text,text[]}
asEWKT({tcbuffer,tcbuffer[],cbuffer[]}) → {text,text[]}
SELECT asText(tcbuffer 'SRID=4326;[Cbuffer(Point(0 0),1)@2001-01-01,
Cbuffer(Point(1 1),2)@2001-01-02)');
-- [Cbuffer(Point(0 0),1)@2001-01-01, Cbuffer(Point(1 1),2)@2001-01-02)
SELECT asText(ARRAY[cbuffer 'Cbuffer(Point(0 0),1)', 'Cbuffer(Point(1 1),2)']);
-- {"Cbuffer(POINT(0 0),1)","Cbuffer(POINT(1 1),2)"}
SELECT asEWKT(tcbuffer 'SRID=4326;[Cbuffer(Point(0 0),1)@2001-01-01,
Cbuffer(Point(1 1),2)@2001-01-02)');
-- SRID=4326;[Cbuffer(Point(0 0),1)@2001-01-01, Cbuffer(Point(1 1),2)@2001-01-02)
SELECT asEWKT(ARRAY[cbuffer 'Cbuffer(SRID=5676;Point(0 0),1)',
'Cbuffer(SRID=5676;Point(1 1),2)']);
-- {"Cbuffer(SRID=5676;POINT(0 0),1)","Cbuffer(SRID=5676;POINT(1 1),2))"}
Return the Moving Features JSON (MF-JSON) representation
asMFJSON(tcbuffer) → text
A circular buffer is always planar 2D. Each value is an object with a point member, an [x, y] coordinate array, and a numeric radius member, mirroring the point and radius accessors.
SELECT asMFJSON(tcbuffer 'Cbuffer(Point(1 2),0.5)@2001-01-01', 3);
/* {"type":"MovingCircularBuffer","bbox":[[0.5,1.5],[1.5,2.5]],
"period":{"begin":"2001-01-01T00:00:00+01","end":"2001-01-01T00:00:00+01",
"lower_inc":true,"upper_inc":true},
"values":[{"point":[1,2],"radius":0.5}],
"datetimes":["2001-01-01T00:00:00+01"],"interpolation":"None"} */
SELECT asMFJSON(tcbuffer 'SRID=4326;[Cbuffer(Point(1 1),0.2)@2001-01-01,
Cbuffer(Point(2 2),0.4)@2001-01-02)', 3);
/* {"type":"MovingCircularBuffer","crs":{"type":"Name",
"properties":{"name":"EPSG:4326"}},"bbox":[[0.8,0.8],[2.4,2.4]],
"period":{"begin":"2001-01-01T00:00:00+01","end":"2001-01-02T00:00:00+01",
"lower_inc":true,"upper_inc":false},
"values":[{"point":[1,1],"radius":0.2},{"point":[2,2],"radius":0.4}],
"datetimes":["2001-01-01T00:00:00+01","2001-01-02T00:00:00+01"],
"lower_inc":true,"upper_inc":false,"interpolation":"Linear"} */
Return the Well-Known Binary (WKB), the Extended Well-Known Binary (EWKB) representation, or the Hexadecimal Extended Well-Known Binary (HexEWKB) representation
asBinary(tcbuffer,endian text='') → bytea
asEWKB(tcbuffer,endian text='') → bytea
asHexEWKB(tcbuffer,endian text='') → text
The result is encoded using either the little-endian (NDR) or the big-endian (XDR) encoding. If no encoding is specified, then the encoding of the machine is used.
SELECT asBinary(tcbuffer 'Cbuffer(Point(1 2),1)@2001-01-01'); -- \x013b0001000000000000f03f0000000000000040000000000000f03f009c57d3c11c0000 SELECT asEWKB(tcbuffer 'SRID=7844;Cbuffer(Point(1 2),1)@2001-01-01'); -- \x013b0041a41e0000000000000000f03f0000000000000040000000000000f03f009c57d3c11c0000 SELECT asHexEWKB(tcbuffer 'SRID=3812;Cbuffer(Point(1 2),1)@2001-01-01'); -- 013B0041E40E0000000000000000F03F0000000000000040000000000000F03F009C57D3C11C0000
Convert a temporal circular buffer to the Arrow C Data Interface and back, returning the reconstructed value
arrowRoundtrip(tcbuffer) → tcbuffer
SELECT arrowRoundtrip(tcbuffer 'Cbuffer(Point(1 2),1)@2001-01-01'); -- Cbuffer(POINT(1 2),1)@2001-01-01
Input from the Well-Known Text (WKT) representation or from the Extended Well-Known Text (EWKT) representation
tcbufferFromText(text) → tcbuffer
tcbufferFromEWKT(text) → tcbuffer
SELECT asEWKT(tcbufferFromText(text '[Cbuffer(Point(1 2),1)@2001-01-01, Cbuffer(Point(3 4),2)@2001-01-02]')); -- [Cbuffer(POINT(1 2),1)@2001-01-01, Cbuffer(POINT(3 4),2)@2001-01-02] SELECT asEWKT(tcbufferFromEWKT(text 'SRID=3812;[Cbuffer(Point(1 2),1)@2001-01-01, Cbuffer(Point(3 4),2)@2001-01-02]')); -- SRID=3812;[Cbuffer(Point(1 2),1)@2001-01-01, Cbuffer(Point(3 4),2)@2001-01-02]
Input from the Moving Features JSON (MF-JSON) representation
tcbufferFromMFJSON(text) → tcbuffer
SELECT asEWKT(tcbufferFromMFJSON(asMFJSON(tcbuffer 'SRID=3812;Cbuffer(Point(1 2),0.5)@2001-01-01', 3))); -- SRID=3812;Cbuffer(POINT(1 2),0.5)@2001-01-01 SELECT asEWKT(tcbufferFromMFJSON(asMFJSON(tcbuffer 'SRID=5676;[Cbuffer(Point(1 2),1)@2001-01-01, Cbuffer(Point(3 4),2)@2001-01-02]', 3))); -- SRID=5676;[Cbuffer(POINT(1 2),1)@2001-01-01, Cbuffer(POINT(3 4),2)@2001-01-02]
Input from the Well-Known Binary (WKB) representation, from the Extended Well-Known Binary (EWKB) representation, or from the Hexadecimal Extended Well-Known Binary (HexEWKB) representation
tcbufferFromBinary(bytea) → tcbuffer
tcbufferFromEWKB(bytea) → tcbuffer
tcbufferFromHexEWKB(text) → tcbuffer
SELECT asEWKT(tcbufferFromBinary( '\x013b0001000000000000f03f0000000000000040000000000000f03f009c57d3c11c0000')); -- Cbuffer(POINT(1 2),1)@2001-01-01 SELECT asEWKT(tcbufferFromEWKB( '\x013b0041a41e0000000000000000f03f0000000000000040000000000000f03f009c57d3c11c0000')); -- SRID=7844;Cbuffer(Point(1 1),2)@2001-01-01 SELECT asEWKT(tcbufferFromHexEWKB( '013B0041E40E0000000000000000F03F0000000000000040000000000000F03F009C57D3C11C0000')); -- SRID=3812;Cbuffer(POINT(1 2),1)@2001-01-01