[GIS] Using QGIS, how can I add a bounding box attribute

geojsonqgisshapefile

I have a shapefile where I am exporting the features to GeoJSON objects with ogr2ogr based on a simple where clause. One thing that I would like to be included in the GeoJSON object is the 'bbox' member (outlined here) , is it possible to add this as an attribute to the shapefile using QGIS?

I've done something similar with centroids and added the x/y as separate attributes. Are there any other ways to programmatically add this to my geojson files?

Best Answer

With ogr2ogr you can use -lco WRITE_BBOX=YES to output bounding box.

Related Question