[gdal-dev] Removing default nodata value from netCDF driver ?

Julien Demaria julien.demaria at acri-st.fr
Tue Nov 5 13:20:25 PST 2019


Thanks Even!

________________________________________
De : Even Rouault [even.rouault at spatialys.com]
Envoyé : mardi 5 novembre 2019 18:07
À : Julien Demaria
Cc : gdal-dev at lists.osgeo.org
Objet : Re: [gdal-dev] Removing default nodata value from netCDF driver ?

On mardi 5 novembre 2019 15:41:47 CET Julien Demaria wrote:
> Ok let's keep this for another PR.
>
> no_fill is not only a write side optimization because nc_inq_var_fill() can
> be called when reading a file (the no_fill value is stored in the hidden
> NetCDF attribute _NoFill, you can print it with ncdump -s but it is only
> set when nofill=true). My understanding is that the only way to define a
> NetCDF variable without a nodata value is to set no_fill=1 by calling
> nc_def_var_fill(NC_NOFILL) because no_fill=0 means you have to use the
> default fillvalue even if the _FillValue attribute is not set so you will
> always have a nodata value. Note that nc_inq_var_fill() does not fill the
> void *fill_valuep if no_fill=1

OK, I've added an extra commit to not report nodata when nc_inq_var_fill()
reports NoFill.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list