I have been attempting to load a stack of rasters into PostGIS from a set of netcdf files.
I can load the files *individually* perfectly well. This works:
raster2pgsql -s 4326 -I -C -F -t 256x256 NETCDF:”/myPath/myFile.nc”:var myTable | psql (etc.) #SUCCEEDS (“var” is the netcdf variable of interest)
…but if I try to process *all* the files in the directory, using a wildcard, the “NETCDF:file:var” expression apparently doesn’t expand properly and it fails (I’ve tried it with quotes and that fails too).
I’ve figured out a workaround using a bash script to append files one at a time, but it’s sort of annoying that the one-liner fails when it seems to be so close to working. It seems like it might just be a bash expansion problem—does anyone know for sure?