Thursday, 6 April 2017

postgis - Changing table name of command using raster2pgsql?


I am completely newbie with GIS and PostGIS as well


I'm trying to load raster into postgreSQL with raster2pgsql. It runs well.


However, the table name of the raster is generated automatically. For example, the raster named: landsat.tiff, then the table name is landsat.


Can we change that name of table? and how we can do it?


Here's what I typed in Windows Command line:


\raster2pgsql -s 4326 *.TIFF -t 100x100 > demo.sql

and insert into database


\psql -U postgres -d demo -f demo.sql


Answer



Here's what you need to type in Windows command line:


\raster2pgsql -s 4326 *.TIFF -t 100x100 table_name > demo.sql

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...