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 bool=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))
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))