Return the temporal H3 cell at the given resolution that contains each point in a temporal geodetic or planar point (SRID must be 4326 for the tgeompoint overload)
th3index(tgeogpoint,integer) → th3index
th3index(tgeompoint,integer) → th3index
SELECT th3GetResolution(th3index( tgeogpoint 'POINT(-73.96 40.78)@2001-01-01', 9)); -- 9@2001-01-01 SELECT th3GetResolution(th3index( tgeompoint 'SRID=4326;POINT(-73.96 40.78)@2001-01-01', 9)); -- 9@2001-01-01
Return the temporal geodetic centroid of each cell in a trajectory. A planar (SRID 4326) overload is available under the name th3CellToLatlngTgeompoint.
th3CellToLatlng(th3index) → tgeogpoint
th3CellToLatlngTgeompoint(th3index) → tgeompoint
SELECT asText(th3CellToLatlng(th3index '871fa44a8ffffff@2001-01-01'), 6); -- POINT(4.297401 50.8043)@2001-01-01 SELECT asText(th3CellToLatlngTgeompoint(th3index '871fa44a8ffffff@2001-01-01'), 6); -- POINT(4.297401 50.8043)@2001-01-01
Return the temporal polygon boundary of each cell in a trajectory, as a temporal geography
th3CellToBoundary(th3index) → tgeography
SELECT ST_GeometryType(getValue(th3CellToBoundary(th3index '871fa44a8ffffff@2001-01-01'))::geometry); -- ST_Polygon -- A hexagon closes on its first vertex, so it has seven points. SELECT ST_NPoints(getValue(th3CellToBoundary(th3index '871fa44a8ffffff@2001-01-01'))::geometry); -- 7