[gdal-dev] WRITE_BBOX not available in GeoJSONSeq lco options?

Thomas Gratier osgeo.mailinglist at gmail.com
Wed Aug 28 15:02:27 PDT 2024


Hi,

I needed to generate bbox at feature level in GeoJSONSeq when creating the
output. I was surprised to not found the option in the driver
https://gdal.org/en/latest/drivers/vector/geojsonseq.html#layer-creation-options
whereas it's available for GeoJSON
https://gdal.org/en/latest/drivers/vector/geojson.html#layer-creation-options
What is the origin of the choice or maybe non-choice? I can always go from
GeoJSON without bbox to GeoJSON with bbox then to GeoJSONSeq but not sure
it's the best way or if there is another way I did not find.
My option so far (combining with jq) is the following

ogr2ogr -f GeoJSON -lco WRITE_BBOX=YES /vsistdout/ poly_nobbox.geojson | jq
-r -c .features[] >| poly_with_box.geojsonl

Regards,

Thomas Gratier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240829/1c6d2411/attachment.htm>


More information about the gdal-dev mailing list