[gdal-dev] NetCDF and EASE-2

Even Rouault even.rouault at spatialys.com
Sun Feb 2 04:15:13 PST 2020


On dimanche 2 février 2020 00:34:46 CET Marsh, Chris wrote:
> HI Even,
> 
> Thanks for the detailed response. I have compiled master 3.1dev however
> strangest thing when I try to run it
 
> $ export PATH=`pwd`/gdal-install/bin:$PATH
> $ which gdal_translate
> /Users/chris/Documents/science/analysis/gdal-install/bin/gdal_translate
>  $ gdal_translate NETCDF:"`pwd`/SD_20160901.nc":snd_upd out.tif -co
> TILED=YES
 ERROR 4:
> NETCDF:/Users/chris/Documents/science/analysis/SD_20160901.nc:snd_upd: No
> such file or directory

Do you have the netCDF driver included ? Check with
"gdalinfo --format netCDF". This file is also a netCDF 4 file, so you need to 
make sure you netCDF lib is built against HDF5.
You may use the "osgeo/gdal" Docker image.
See https://github.com/OSGeo/gdal/blob/master/gdal/docker/README.md

> $ ls
> /Users/chris/Documents/science/analysis/SD_20160901.nc
> /Users/chris/Documents/science/analysis/SD_20160901.nc
> 
> If I try to use my homebrew installed gdal_translate it works.
> 
> I've also tried without the `pwd` but that doesn't work either. This seems
> like a stupid PEBKAC but I'm out of ideas.
 
> Trying the 2nd command resulted in
> 
> $ /gdal-install/bin/gdalmdimtranslate out.tif out2.tif -co TILED=YES -array
> band=1,transpose=[1,0],view=[::-1,::-1]
 zsh: no matches found:

Ah, just trying with zsh, this is just a quoting issue. You need to surround 
the value of the array option with double quotes

... -array "band=1,transpose=[1,0],view=[::-1,::-1]"

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list