[gdal-dev] NetCDF config option for west > east?

Markus Metz markus.metz.giswork at gmail.com
Sat Nov 24 09:24:14 PST 2018


On Sat, Nov 24, 2018 at 5:56 PM Even Rouault <even.rouault at spatialys.com>
wrote:
>
> > This particular NetCDF file, PM10 analysis from CAMS
> > http://www.regional.atmosphere.copernicus.eu/, does not have a longitude
> > variable, also no subdatasets. Resolution should be 0.1 degrees, but
GDAL
> > reports
> > Pixel Size = (-0.415021467959250,-0.100000003824258)
> > because west > east
> >
>
> ok, ncdump on it confirms there's a clean discontinuity, and regular
spacing
> before and after:
>
>  longitude = 335.05, 335.15,[...], 359.85, 359.95,
>     0.04998779, 0.1499939, [...] 44.84998, 44.94998;

ncdump also confirms that longitudes are increasing from west:
longitude = 335.05, 335.15
this is correct, while GDAL assumes that longitudes are decreasing from west

The discontinuity  359.95, 0.04998779 is not a discontinuity with regard to
their location on earth, the spacing is still about 0.1 because 0.04998779
= 360.04998779
>
> the netCDF driver could detect and autocorrect this. Should be around line
> 3174 of frmts/netcdf/netcdfdataset.cpp

I will have a look.

Thanks for your very fast feedback!

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20181124/ba6b26ed/attachment.html>


More information about the gdal-dev mailing list