raster2pgsql command expansion issue?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

raster2pgsql command expansion issue?

John Payne

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).

                raster2pgsql -s 4326 -I -C -F -t 256x256 NETCDF:/myPath/*.nc:var myTable | psql (etc.)     #FAILS

raster2pgsql -s 4326 -I -C -F -t 256x256 NETCDF:”/myPath/*.nc”:var myTable | psql (etc.) #FAILS

 

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?

 

Thanks!

 

John Payne

 


_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Loading...