Dear all,
I am computing the inherent optical properties using C2RCC with Sentinel 2 data with the GPT. The final products are converted to NetCDF files, as I need to do further statistics with the values.
As I import the NetCDF in QGIS no information about the geographic system is being stored.
I try to give it in manually - WGS84, UTM Zone 35N, however this doesn’t reproject the layer - it just disappears from the preview.
The same output saved in .dim format works perfectly fine with SNAP:
However I need to work with the NetCDFs due to the statistics which I calculate with different software.
I managed to visualize the NetCDF correctly with python though, however without the Basemap.
The NetCDF export should happen from the GPT.
I have tried all four formats with the same result.
Apparently SNAP looses the information about the geoprojection when converting to NetCDF and currently my only workaround is to visualize the results in Python without a Basemap.
It is likely that your QGIS is slightly broken. If python found the geolocation metadata the NetCDF files are probably OK. NASA Panoply i another way to check geolocation and visualize NetCDF data.
QGIS import uses GDAL libraries via python, which in turn uses proj, netcdf, and hdf5 libraries. It is not unusual to have multiple versions of all these libraries installed, so there is potential that QGIS finds the wrong version (e.g., due to shoddy configuration changes made by another app).
The thing is that python doesn’t recognize the projection. If I try plotting the data using Basemap it does not work.
I can plot it only using matplotlib.pcolor(lon, lat, data), which is a generic way of plotting NetCDF without needing any type of projection information.
I have also tried to reproject the data using pyproj in python, also without success.