withComputedBbox

Returns a copy of this GeoJSON object with a computed bounding box.

For Geometry types, it computes the bounding box of the geometry's coordinates. For a Feature, it computes the bounding box of its geometry. For a FeatureCollection or GeometryCollection, it computes the bounding box of all contained coordinates.

Return

A copy of this object with the bbox property set to the computed bounding box, or null if there are no coordinates.