<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>I am using GDAL to create a multidimensional zarr file that is sozip compressed. I see this error when creating the file:</div><div><br></div><div>ERROR 1: dish_positions.00000000.zarr/zarr.json already exists in ZIP file</div><div>ERROR 8: Open file /vsizip/data/fengine_init_pathfinder/cx66_dish_positions.00000000.zarr.zip/dish_positions.00000000.zarr/zarr.json to write failed</div><div><br></div><div>Everything is working fine when I do not use sozip compression. I enable sozip compression by adding a "/vsizip" prefix to the file name. Although there is an error reported on screen, I do not see an error code reported by the function creating or closing the multidimensional dataset. The resulting file ("*.zarr.zip") is created fine and looks almost correct, but all attributes seem to be missing.</div><div><br></div><div>I wonder – is it actually possible to create a zarr file that is sozip compressed, given that zarr probably writes to each of its file multiple times? If not, what is the preferred way to create a sozip-compressed zarr file efficiently?</div><div><br></div><div>Some details:</div><div><br></div><div>I create the dataset (i.e. the file) via</div><div><br></div><div><div>                const auto driver_manager = GetGDALDriverManager();</div><div>                const auto driver = driver_manager->GetDriverByName("Zarr");</div></div><div><div>                const auto dataset = std::unique_ptr<GDALDataset>(driver->CreateMultiDimensional(</div><div>                    full_path.c_str(), root_group_options_c.data(), options_c.data()));</div></div><div><br></div><div>where "full_path" is "/vsizip/data/fengine_init_pathfinder/cx66_dish_positions.00000000.zarr.zip/dish_positions.00000000.zarr".</div><div><br></div><div>I then create multiple attributes ("CreateAttribute") and then</div><div><br></div><div><div>                const auto mdarray = group->CreateMDArray(meta->get_name(), dimensions, datatype,</div><div>                                                          array_options_c.data());</div></div><div><div>                    const bool success = mdarray->Write(</div><div>                        arrayStart.data(), count.data(), nullptr, bufferStride.data(), datatype,</div><div>                        frame + datatypesize * meta->offset, frame, buffer->frame_size);</div></div><div><br></div><div>and finish with</div><div><br></div><div><div>                const CPLErr err = dataset->Close();</div><div>                assert(!err);</div></div><div><br></div><div>The full code is available at <<a href="https://github.com/kotekan/kotekan/blob/eschnett/updates-2/lib/stages/gdalFileWrite.cpp">https://github.com/kotekan/kotekan/blob/eschnett/updates-2/lib/stages/gdalFileWrite.cpp</a>>.</div><div><br></div><div>-erik</div></body></html>