This module contains functions that provide information about internal geometries.
ST_ENVELOPE_ARR(geojsons)
Takes any number of features and returns a rectangular Polygon that encompasses all vertices.
SELECT CARTO.CARTO.ST_ENVELOPE_ARR(
ARRAY_CONSTRUCT(
ST_ASGEOJSON(ST_POINT(-75.833, 39.284))::STRING,
ST_ASGEOJSON(ST_POINT(-75.6, 39.984))::STRING,
ST_ASGEOJSON(ST_POINT(-75.221, 39.125))::STRING
)
);
-- { "coordinates": [ [ [ -75.833, 39.125 ], [ -75.221, 39.125 ], [ -75.221, 39.984 ], ...