May 2017
Beginner to intermediate
328 pages
7h 17m
English
Let's import a directory of rasters now. We have four files with the file name mask gray_50m_partial*.tif. In order to import all the files at once, we'll issue the following command:
raster2pgsql -s 4326 -C -l 2,4 -I -F -t 2700x2700 gray_50m_partial*.tif data_import.gray_50m_partial | psql -h localhost -p 5434 -U postgres -d mastering_postgis
You should see a similar output:
Processing 1/4: gray_50m_partial_bl.tifBEGINCREATE TABLECREATE TABLECREATE TABLEINSERT 0 1INSERT 0 1INSERT 0 1Processing 2/4: gray_50m_partial_br.tif(...)Processing 3/4: gray_50m_partial_tl.tif(...)Processing 4/4: gray_50m_partial_tr.tif(...)CONTEXT: PL/pgSQL function addrasterconstraints(name,name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean) ...
Read now
Unlock full access