[gdal-dev] Removing default nodata value from netCDF driver ?
Even Rouault
even.rouault at spatialys.com
Mon Nov 4 09:14:20 PST 2019
Hi,
It has been raised to my attention that the netCDF driver systematically
reports a nodata value when opening a dataset, even if no explicit _FillValue
metadata item is set in the product. This seems to be a behaviour that has
existed forever, but I'm not clear why. For byte/ubyte data types, the nodata
value is set to 0 by default.
But for some products, like Sentinel 3 S3A_SL_2_LST products, in the
LST_ancillary_ds.nc file, 0 is a valid value.
See following extract of ncdump on such a product:
ubyte biome(rows, columns) ;
biome:flag_meanings = "open_ocean irrigated_cropland
rainfed_cropland mosaic_cropland mosaic_vegetation
broadleaved_evergreen_forest closed_broadleaved_deciduous_forrest
open_broadleaved_deciduous
_forest closed_needleleaved_forest open_needleleaved_forest mixed_forest
mosaic_forest mosaic_grassland shrubland grassland sparse_vegetation
freshwater_flooded_forest saltwater_flooded_forest flooded_vegetation
artificial_surface bare_area_unknown bare_area_orthents bare_area_sand
bare_area_calcids bare_area_cambids bare_area_orthels water snow_and_ice
unfilled" ;
biome:flag_values = 0UB, 1UB, 2UB, 3UB, 4UB, 5UB, 6UB, 7UB,
8UB, 9UB, 10UB, 11UB, 12UB, 13UB, 14UB, 15UB, 16UB, 17UB, 18UB, 19UB, 20UB,
21UB, 22UB, 23UB, 24UB, 25UB, 26UB, 27UB, 28UB ;
biome:long_name = "Gridded GlobCover surface classification
code" ;
So per https://github.com/OSGeo/gdal/pull/1979, I'm proposing to remove this
default nodata value. Anybody seeing a side effect to this ?
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list