Revisiting our geo export options after several years and hit something
weird.

Testing with the command-line tools, this works...

ogr2ogr -f "geojson" /vsigzip//path/to/output.geojson.gz <input>

This does not...

ogr2ogr -f "geojson" /vsizip//path/to/output.geojson.zip <input>

It spits a ton of errors (attached) and while the zip file is created, it
has no files in it.

Am I doing something silly, or is this a bug?

Does anyone really use or expect individually-zipped GeoJSON files anyway?

This is with GDAL 3.7.3. We are updating to 3.11 so I'll try that too.

-- 
Simon Eves
Senior Rendering Engineer
+1 (415) 902-1996
simon.e...@heavy.ai
simon.eves@EVESPC2024:~/dumps/exports$ ogr2ogr -f "geojson" 
/vsizip/states_z.geojson.zip states_z.geojson 
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 1: Terminating translation prematurely after failed
translation of layer states_z (use -skipfailures to skip errors)
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles
ERROR 6: VSIFWriteL() is not supported on main Zip file or closed subfiles

simon.eves@EVESPC2024:~/dumps/exports$ ls -l
total 232
-rw-rw-r-- 1 simon.eves simon.eves 168084 Feb 21 15:01 states_z.geojson
-rw-rw-r-- 1 simon.eves simon.eves     22 Feb 21 15:02 states_z.geojson.zip

simon.eves@EVESPC2024:~/dumps/exports$ unzip -l states_z.geojson.zip 
Archive:  states_z.geojson.zip
warning [states_z.geojson.zip]:  zipfile is empty
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to