[gdal-dev] netcdf driver does not support VSIFILE

Even Rouault even.rouault at mines-paris.org
Fri Jun 15 08:44:18 PDT 2012


Selon Etienne Tourigny <etourigny.dev at gmail.com>:

> All VSIFILE interfaces (/vsicurl/ , /vsigzip/ , etc.) do not work with
> the netcdf driver.
>
> As the netcdf driver uses libnetcdf, I'm not sure the driver can be
> modified to use the "large file API".
>
> Can someone comment on this?
>
> The GTiff driver support VSI, how is this done given that the driver
> uses libgeotiff? Does the tifvsi.cpp/ file make this possible, by
> acting as a proxy?

libtiff has a TIFFClientOpen() interface where you provide pointers to functions
for various stuff, including I/O functions. And libgeotiff has a similar
XTIFFClientOpen() that just calls TIFFClientOpen() after doing some libgeotiff
initialization.

> If so, can a similar thing be done with libnetcdf?

You are probably one of the best placed to answer the question ;-)

More seriously, you need to look at the libnetcdf API to see if it offers some
abstraction layer for its I/O, that can be customized, instead of doing directly
fopen(), fread(), fwrite(), fseek(), fclose() directly all over its code. If
not, and you want it, you'll need to hack into libnetcdf to avoid those direct
calls to the standard library.

>
> thanks,
> Etienne
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list