Return or set the spatial reference identifier
SRID(tcbuffer) → integer setSRID(tcbuffer,integer) → tcbuffer
SELECT SRID(tcbuffer 'SRID=5676; [Cbuffer(Point(0 0),1)@2001-01-01, Cbuffer(Point(1 1),2)@2001-01-02)'); -- 5676 SELECT asEWKT(setSRID(tcbuffer '[Cbuffer(Point(0 0),1)@2001-01-01, Cbuffer(Point(1 1),2)@2001-01-02)', 5676)); -- SRID=5676;[Cbuffer(POINT(0 0),1)@2001-01-01, Cbuffer(POINT(1 1),2)@2001-01-02)
Transform to a spatial reference identifier
transform(tcbuffer,integer) → tcbuffer transformPipeline(tcbuffer,pipeline text,srid integer, is_forward boolean=true) → tcbuffer
The transform function specifies the transformation with a target SRID. An error is raised when the input temporal circular buffer has an unknown SRID (represented by 0). The transformPipeline function specifies the transformation with a defined coordinate transformation pipeline represented with the following string format: urn:ogc:def:coordinateOperation:AUTHORITY::CODE. The SRID of the input temporal circular buffer is ignored, and the SRID of the output temporal circular buffer will be set to zero unless a value is provided via the optional srid parameter. As stated by the last parameter, the pipeline is executed by default in a forward direction; by setting the parameter to false, the pipeline is executed in the inverse direction.
SELECT asEWKT(transform(tcbuffer 'SRID=4326;Cbuffer(Point(4.35 50.85),1)@2001-01-01', 3812)); -- SRID=3812;Cbuffer(POINT(648679.0180353033 671067.0556381135),1)@2001-01-01
WITH test(tcbuffer, pipeline) AS (
SELECT tcbuffer 'SRID=4326;{Cbuffer(Point(4.3525 50.846667),1)@2001-01-01,
Cbuffer(Point(-0.1275 51.507222),2)@2001-01-02}',
text 'urn:ogc:def:coordinateOperation:EPSG::16031' )
SELECT asEWKT(transformPipeline(transformPipeline(tcbuffer, pipeline, 4326), pipeline,
4326, false), 6) FROM test;
/* SRID=4326;{Cbuffer(POINT(4.3525 50.846667),1)@2001-01-01,
Cbuffer(POINT(-0.1275 51.507222),2)@2001-01-02} */
Return the area traversed by the temporal circular buffer
traversedArea(tcbuffer,unary_union boolean=false) → geometry
SELECT ST_AsText(traversedArea(tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-02]')); -- CURVEPOLYGON(CIRCULARSTRING(0.5 1,1.5 1,0.5 1)) SELECT ST_AsText(traversedArea(tcbuffer '[Cbuffer(Point(1 1), 0.5)@2001-01-01, Cbuffer(Point(3 1), 0.5)@2001-01-02, Cbuffer(Point(1 1), 0.5)@2001-01-03]', true)); /* CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(3 0.5,3.5 1,3 1.5),(3 1.5,1 1.5), CIRCULARSTRING(1 1.5,0.646446609406726 1.353553390593274,0.5 1), CIRCULARSTRING(0.5 1,0.646446609406726 0.646446609406726,1 0.5),(1 0.5,3 0.5))) */ SELECT ST_AsText(traversedArea(tcbuffer '[Cbuffer(Point(1 1), 0)@2001-01-01, Cbuffer(Point(3 1), 0)@2001-01-02, Cbuffer(Point(4 1), 0.5)@2001-01-03]', true)); /* GEOMETRYCOLLECTION(CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(3.75 0.566987298107781, 4.5 1,3.75 1.433012701892219),(3.75 1.433012701892219,3 1,3.75 0.566987298107781))), LINESTRING(1 1,3 1)) */
The argument is false unless it is given, and the function then answers the pieces the buffer sweeps, each a disc or the region a disc sweeps between two consecutive instants, gathered into one geometry. With unary_union = true they are dissolved into the region they cover, computed exactly: every meeting of the circles and of the segments joining them is decided on the input coordinates, no arc is replaced by segments, and only the vertices of the result are rounded, each once. The result keeps its arcs, as a CURVEPOLYGON or a MULTISURFACE. Where the buffer keeps a zero radius, the line or the point it draws that no disc covers is returned beside the surfaces in a GEOMETRYCOLLECTION. Where the computation cannot decide a meeting or an order of the boundaries, the function raises an error rather than answer an approximation.
Return the temporal geometric point given by the centers of a temporal circular buffer
centroid(tcbuffer) → tgeompoint
SELECT asText(centroid(tcbuffer '[Cbuffer(Point(1 1), 0.5)@2001-01-01, Cbuffer(Point(3 3), 0.5)@2001-01-03]')); -- [POINT(1 1)@2001-01-01, POINT(3 3)@2001-01-03]
Return the convex hull of the area traversed by the temporal circular buffer
convexHull(tcbuffer) → geometry
The convex hull is computed on the exact traversed area, arcs included: an arc reaches past the points that define it, so it contributes to the hull the piece of its circle that no other feature of the area reaches past. The result is therefore a curved CURVEPOLYGON bounded by a COMPOUNDCURVE of circular arcs and straight segments, as exact as the region returned by traversedArea. The hull is linear only when the buffer keeps a zero radius, since the traversed area then carries no arc.
SELECT ST_AsText(convexHull(tcbuffer '[Cbuffer(Point(1 1), 0.5)@2001-01-01, Cbuffer(Point(1 3), 0.5)@2001-01-02]')); /* CURVEPOLYGON(COMPOUNDCURVE((1.5 3,1.5 1),CIRCULARSTRING(1.5 1,1 0.5,0.5 1), (0.5 1,0.5 3),CIRCULARSTRING(0.5 3,1 3.5,1.5 3))) */ SELECT ST_AsText(convexHull(tcbuffer '[Cbuffer(Point(1 1), 0)@2001-01-01, Cbuffer(Point(1 3), 0)@2001-01-02, Cbuffer(Point(3 3), 0)@2001-01-03]')); -- POLYGON((1 1,1 3,3 3,1 1))