[gdal-dev] NetCDF: North is left
Even Rouault
even.rouault at spatialys.com
Tue Mar 19 08:53:54 PDT 2019
Markus,
yes this file has unconventionnal indexing of variables, with the fastest
varying dimension being latitude, which confuses the driver
In https://github.com/OSGeo/gdal/pull/1377, I've made a number of changes that
make support of such dataset a bit easier. I didn't go to making the driver
autocorrect the swapped axis, but did a number of fixes so that the
geotransform and Geolocation array metadata are correct (and also improve the
geoloc transformer/wrapper to deal with such swapped axis)
With those fixes, the following does the right thing:
$ gdalwarp -geoloc NETCDF:"LPRM-
AMSR2_L3_DS_A_SOILM3_V001_20190301000851.nc4":ts /tmp/out.tif -overwrite
Without it, you can indeed have the expected result by setting GCP
$ gdal_translate \
NETCDF:"LPRM-AMSR2_L3_DS_A_SOILM3_V001_20190301000851.nc4":ts \
tmp.vrt \
-gcp 0 0 -180 90 \
-gcp 1800 0 -180 -90 \
-gcp 0 3600 180 90 \
-gcp 1800 3600 180 -90
$ gdalwarp tmp.vrt out.tif -order 1 --config GDAL_NETCDF_BOTTOMUP 0 -overwrite
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list