-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zarr driver #3896
Zarr driver #3896
Conversation
62a8e59
to
9f325dd
Compare
This is now feature ready. Zarr driver RFCWho asked for the driver and why?Zarr is an emerging format, natively capable for multidimensional raster and cloud friendly. A number of parties have expressed a desire to see it handled in GDAL. This work takes a different approach than the one proposed in #3411 for the reasons mentioned in #3411 (comment) It should also be noted that libnetcdf 4.8.0 has initial support for ZarrV2, but based on our testing, it lacks maturity, and having a dedicated driver in GDAL gives more control, particularly regarding the I/O layer where any VSI virtual file system can be used, or the possibility to easily add CRS support as we have done. Read / Write / ReadWrite ?Read, creation and update Raster / Vector / Raster&Vector?Raster, implementing classic 2D and multidimensional API Driver name info
Should this be compiled in by default, optional build, or plugin?Built-in by default, can be disabled in autoconf builds using standard mechanism (--disable-driver-zarr) Does this driver require other drivers be built?No, but it strongly benefits from building GDAL against liblz4, liblzma, libzstd and libblosc to benefit from all compression methods Is there a standard(s) that the driver is working to implement?There's a specification for ZarrV2 at https://zarr.readthedocs.io/en/stable/spec/v2.html, which is the one mentioned above as being submitted to OGC. How feature complete will the driver be?It implements most of the Zarr V2 specification, except:
Driver capabilities.Supports: Raster Support for the following features :
None
None
None
What external libraries does this driver depend on?
Are there version requirements for the libraries?The versions provided by Ubuntu 20.04 are sufficient to get the driver building and working. What licenses do the libraries have?
Does the driver require a binary SDK?No Any external services required for the driver?No Any external service providers required for the driver?No Testing planThis driver has an autotest script in Maintenance plan?Mostly have a look on where Zarr V3 goes on. Current status in documentation for it is indicated as experimental Who / what org is responsible for upkeep on this new driver?Even Rouault Where to report bugs?GDAL gitub issue tracker Draft help textsee gdal/doc/source/drivers/raster/zarr.rst in PR for details What are the conditions for removing the driver?If nobody longer interested in keeping it in a buildable and working state Does the driver already have a draft implementation?Yes Who implemented it? Or who will implement this driver? Does an implementer(s) need to be found?Even Rouault Is there funding needed?No, funding of the work has already been provided Who will review the code / PR?TBD |
Is anyone interested in giving this some review ? I know this is a bit overwhelming. I could offer some funding if that might help and being practical to setup. |
cc @thomascoquet ? |
|
…ation for libdeflate code path
I'll merge this PR next week if there is no objection or further comments |
AC_ARG_WITH(blosc,[ --with-blosc[=ARG] Include blosc support (ARG=yes/no/installation_prefix)],,) | ||
|
||
if test "$with_blosc" = "" -o "$with_blosc" = "yes" ; then | ||
AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,) | ||
|
||
if test "$HAVE_BLOSC" = "yes" ; then | ||
LIBS="-lblosc $LIBS" | ||
else | ||
if test "$with_blosc" = "yes" ; then | ||
AC_MSG_ERROR([libblosc not found]) | ||
else | ||
echo "libblosc not found - BLOSC support disabled" | ||
fi | ||
fi | ||
elif test "$with_blosc" != "" -a "$with_blosc" != "no"; then | ||
|
||
AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,-L$with_blosc/lib) | ||
|
||
if test "$HAVE_BLOSC" = "yes" -a -f "$with_blosc/include/blosc.h" ; then | ||
LIBS="-L$with_blosc/lib -lblosc $LIBS" | ||
EXTRA_INCLUDES="-I$with_blosc/include $EXTRA_INCLUDES" | ||
else | ||
AC_MSG_ERROR([libblosc not found]) | ||
fi | ||
|
||
else | ||
HAVE_BLOSC=no | ||
fi | ||
|
||
AC_SUBST(HAVE_BLOSC,$HAVE_BLOSC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too fragile, c-blosc may depend on lz4, snappy, zlib and zstd. A naive AC_CHECK_LIB
may break due to missing dependencies in LIBS. c-blosc provides a pkg-config file: blosc.pc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too fragile, c-blosc may depend on lz4, snappy, zlib and zstd. A naive
AC_CHECK_LIB
may break due to missing dependencies in LIBS. c-blosc provides a pkg-config file:blosc.pc
too fragile for static builds of c-blosc ? should work fine hopefully for dynamic builds of c-blosc. Anyway autoconf builds will be soon deprecated, so any improvements if any needed should go to the CMake builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too fragile for static builds of c-blosc ?
yes (in conan-center, by default all libs are built against static dependencies so we quickly see these kind of issues).
Anyway autoconf builds will be soon deprecated, so any improvements if any needed should go to the CMake builds
Great ! I'll check that while packaging the first release using CMakeLists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great ! I'll check that while packaging the first release using CMakeLists.
early testing of CMake builds of master would be appreciated
Another approach at creating a Zarr driver than the one of PR #3411 (see analysis done in #3411 (comment))
Scope is:
Tasklist
Read support of arrays with multidimensional API
Read support for compression methods, using an extendable API
Read support for Zarr V2 arrays
Read support for compound data types
Read support for non-GDAL-native types (such as int1, int8, uint8, half-float)
Read support for Fortran block ordering
Read support for CRS
Read support for groups
Read support for consolidated metadata
Read support for XArray _ARRAY_DIMENSIONS
Read support for Zarr V3
Read support for filters (limited to delta as builtin)
Read support for group attributes
Read support for array attributes
Read support with classic 2D API
Creation support of ZarrV2 arrays with multidimensional API
Write support for compression methods
Write support for filters (limited to delta as builtin)
Write support for group creation
Write support for group attributes
Write support for array attributes
Write support for CRS
Write support for consolidated metadata
Write support for XArray _ARRAY_DIMENSIONS
Write support for Zarr V3
Write support with classic 2D API
Documentation page