|
Hello: I'm
using xarray and rioxarray in python to create a DataSet then
export to Netcdf. After saving, when I check the exported
files with gdalinfo using GDAL 3.2, I see the correct extent.
However, when using GDAL >=3.4 (i.e in a conda env) it
seems that the extents are lost, and the NetCDF dimensions
appear instead. This causes the resulting NetCDF to appear at
coords (0,0) - the wrong place - in QGIS (on a system with the
newer GDAL).
Here is the output with my system installed GDAL:
micha@RMS:Kinneret$ gdalinfo
--version Lower Right ( 754558.000, 3621606.000) ( 35d42'55.82"E, 32d42'10.25"N)
However, in my conda environment, with a newer GDAL:
micha@RMS:Kinneret$ conda
activate geo What do I need to add to the xarray Dataset so that the newer GDAL gets the correct extent? In both cases all the "grid_mapping" metadata entries point to "spatial_ref", and the full spatial_ref details are available in the NetCDF file.
(Note:
double posted to GIS.stackexchange at
https://gis.stackexchange.com/questions/442323/changes-to-gdal-netcdf-driver-between-3-2-and-3-4)
Thanks -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 |
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
