The three metric functions take an optional unit argument. For areas: km2 (default), m2, or rads2. For lengths: km (default), m, or rads. Passing an area unit to a length function (or vice-versa) raises an error.
Return the temporal area of each cell in a trajectory, in the requested unit
th3CellArea(th3index,text='km2') → tfloat
SELECT th3CellArea(th3index '871fa44a8ffffff@2001-01-01'); -- 4.441914270110932@2001-01-01 SELECT th3CellArea(th3index '871fa44a8ffffff@2001-01-01', 'm2'); -- 4441914.270110932@2001-01-01
Return the temporal length of each directed edge in a trajectory, in the requested unit
th3EdgeLength(th3index,text='km') → tfloat
SELECT th3EdgeLength(th3CellsToDirectedEdge(th3index '871fa44a8ffffff@2001-01-01',
th3index '871fa44aeffffff@2001-01-01'));
-- 1.272084901305088@2001-01-01
Return the temporal great-circle distance between two temporal geodetic points (not between cells). The two operands are synchronised.
greatCircleDistance(tgeogpoint,tgeogpoint,text='km') → tfloat
SELECT greatCircleDistance(tgeogpoint 'Point(0 0)@2001-01-01', tgeogpoint 'Point(1 0)@2001-01-01'); -- 111.19505197522943@2001-01-01