The Land cover classification gridded maps from 1992 to present derived from satellite observations netCDF files present issues for the coordinate reference system (CRS) using GDAL and QGIS:
- gdalinfo NETCDF:C3S-LC-L4-LCCS-Map-300m-P1Y-2018-v2.1.1.nc:lccs_class returns the coordinates, but the CRS remains undefined.
- gdalsrsinfo gives an error retrieving the CRS information.
- In QGIS 3.x, the standard Layer -> Add Layer -> Add Raster Layer on the whole file should give an option to select the different data layers (subdataset) instead it returns: "Invalid Layer: Raster layer Provider is not valid"
As work-around until the format is improved, we suggest users to try:
Layer -> Add Layer -> Add Raster Layer pick the .nc file using the file browser then edit the path to the file by prefixing it with "NETCDF:" and appending it with colon ":" and the subdataset name. For instance, editing the text box to
NETCDF:C3S-LC-L4-LCCS-Map-300m-P1Y-2018-v2.1.1.nc:lccs_class will open the lccs_class layer, with a warning about the CRS (it falls back to EPSG:4326 or geographic lat/lon with WGS84, which is the right CRS).
The available subdatasets and their names can be found in the output of the gdalinfo on the whole file and should be one of:
- lccs_class
- processed_flag
- current_pixel_state
- observation_count
- change_count
The lat_bounds, lon_bounds and time_bounds provide coordinate values for each grid cell.
1 Comment
Ayush Joshi
Hello,
I tried using your suggested addition but it doesn`t load the file at all now with "Unsupported Data Source" message in the log